Free tutorials & notes in Hindi & English · Clean code examples 🧰 Free PDF & Image Tools →
MySQL + SQL · Lesson 15

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 = table, tuple = row, attribute = column. The rest describe their sizes and values.

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.

rollnamemarks
1Aman88
2Diya92

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, name and marks are 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.

Frequently Asked Questions

What is a relation in DBMS?
A relation is the formal name for a table in a relational database. It is a set of rows (tuples) and columns (attributes). So when a textbook says "relation", it simply means a table.
What is a tuple and an attribute?
A tuple is one row of a relation (one record), and an attribute is one column (a field). For example, in a students table, each student is a tuple, and name and marks are attributes.
What is a domain in DBMS?
A domain is the set of allowed values for an attribute. For example, the domain of a marks column might be integers from 0 to 100, and the domain of a gender column might be {Male, Female, Other}.
What is the difference between degree and cardinality?
Degree is the number of attributes (columns) in a relation. Cardinality is the number of tuples (rows). So a table with 3 columns and 50 rows has degree 3 and cardinality 50.
What is a relation schema vs a relation instance?
A relation schema is the structure — the relation name and its attributes, like Students(roll, name, marks). A relation instance is the actual set of tuples (rows) in it at a given time.
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

Next topicSchema and Instance in DBMS Your progress: 15 / 151 (10%) · Lesson 16 / 151 Continue →

How was this lesson?

Your feedback helps us make the content better.

Write a review or suggestion (optional)

After approval, your name and city may appear publicly with your review. Please do not write your email or phone number.

▶ CodingEasily on YouTube

Learn with video lessons in easy Hindi

Featured video: RDBMS Part 3 – Class XI Commerce IT

▶ Subscribe – it’s free