Relation Terms in DBMS (Tuple, Attribute, Degree, Cardinality)
In this lesson: Relation terms in DBMS — tuple, attribute, domain, degree and cardinality — with a labelled table and solved questions.
The formal words
Textbooks describe relational databases with formal terms like relation, tuple, attribute, domain, degree and cardinality. They sound complicated, but each just names a familiar part of a table. Learning them helps you read DBMS theory and exam questions with ease.
Relation
A relation is simply a table — a set of rows and columns. The word comes from the mathematical basis of the relational model. Whenever you read "relation", picture a table.
| roll | name | marks |
|---|---|---|
| 1 | Aman | 88 |
| 2 | Diya | 92 |
This whole table is one relation, called (say) Students.
Tuple and attribute
- Tuple — one row (record). In the table above,
(1, Aman, 88)is a tuple. - Attribute — one column (field).
roll,nameandmarksare attributes.
So a relation is made of tuples (rows), and each tuple has a value for every attribute (column).
Domain
A domain is the set of allowed values for an attribute. For example:
- Domain of
marks: integers from 0 to 100. - Domain of
name: strings of letters. - Domain of
gender: {Male, Female, Other}.
Any value in an attribute must come from its domain, which keeps data valid.
Degree and cardinality
- Degree — the number of attributes (columns). The Students relation has degree 3.
- Cardinality — the number of tuples (rows). With 2 students, cardinality is 2.
An easy way to remember: degree counts columns, cardinality counts rows.
Related key terms
- Relation schema — the structure:
Students(roll, name, marks). - Relation instance — the actual rows at a moment in time.
- Primary key — the attribute that uniquely identifies each tuple.
These tie the formal terms back to the schema-and-instance idea you already know.
Common mistakes
- Thinking "relation" means a relationship. A relation is a table, not a link between tables.
- Swapping degree and cardinality. Degree = columns; cardinality = rows.
- Confusing domain with data type. Domain is the allowed value set; a data type is broader.
- Mixing tuple and attribute. Tuple is a row; attribute is a column.
Summary
- Relation = table; tuple = row; attribute = column.
- Domain = the allowed values for an attribute.
- Degree = number of columns; cardinality = number of rows.
- Relation schema is the structure; instance is the current data.
- These formal terms just rename familiar table parts.
Next, revise the model in relational database, or the structure vs data idea in schema vs instance.
