MySQL + SQL · Lesson 14
Relation, Tuple, Attribute, Domain, Degree and Cardinality
Relational Terminology
These six terms describe the structure of a table (relation) and appear in almost every DBMS exam.
The Six Terms
| Term | Meaning | students table example |
|---|---|---|
| Relation | The table itself | students |
| Tuple | A single row | (1, Aman, 88) |
| Attribute | A column | roll_no, name, marks |
| Domain | Allowed values of an attribute | marks: 0–100 |
| Degree | Number of attributes (columns) | 3 |
| Cardinality | Number of tuples (rows) | e.g. 50 students |
Summary
- Relation=table, Tuple=row, Attribute=column.
- Domain=allowed values, Degree=column count, Cardinality=row count.
💻 Live Code Editor
Is page ki language (MYSQL) mein code likhein aur turant chalाएं — yahीं, bina kuch install kiye.Powered by OneCompiler. Agar editor na khule to yahान naye tab mein kholein.
💻 Live Code Editor
Is page ke program yahan ready hain — chalाएं, badlें aur seekhें. Bina kuch install kiye.
Powered by OneCompiler. Editor mein code apne aap aa jata hai — Run dabaakर output dekhें.
Agar load na ho to naye tab mein kholें.