Study Guides/Computer Science/Tuple in DBMS โ€” Meaning and Example
Study Guide ยท Computer Science

Tuple in DBMS โ€” Meaning, Example, Degree and Cardinality

In a Database Management System (DBMS), especially in the relational model, data is stored in the form of tables called relations. A tuple is a single row or record of a relation. In other words, each horizontal row of a table is called a tuple, and it represents one complete record โ€” for example, the details of one student or one employee. Understanding the term tuple, along with related terms like attribute, degree and cardinality, is basic to learning the relational database model.

Question (Click to Flip)

What is a tuple in DBMS?

Answer

A tuple in DBMS is a single row or record of a relation (table) in the relational model. It contains a set of related values โ€” one for each attribute (column) โ€” that together describe one entity, such as the details of one student or one employee. A tuple is also called a record or a row.

Card 1 of 3 free previews

Key Facts

A tuple is a single row or record of a relation (table) in a DBMS.

A tuple is also called a record or a row.

Each tuple contains one value for each attribute (column).

An attribute is a column; a tuple is a row.

Degree = number of attributes (columns) in a relation.

Cardinality = number of tuples (rows) in a relation.

Each tuple is usually uniquely identified by a primary key.

What is a Tuple?

A tuple is a single row of a relation (table) in a DBMS. Each tuple contains a set of related values, one for each attribute (column), and together they describe one entity or record.

For example, in a STUDENT table:

Roll No | Name | Class 1 | Aman | 10 2 | Riya | 9

Here, the row '1, Aman, 10' is one tuple, and '2, Riya, 9' is another tuple. Each tuple gives the complete information about one student.

A tuple is also called a record or a row.

Tuple and Related Terms

  1. Relation: a table in which data is stored.
  2. Tuple: a single row of the relation (a record).
  3. Attribute: a single column of the relation (a field), such as 'Name' or 'Class'.
  4. Domain: the set of allowed values for an attribute.
  5. Degree: the number of attributes (columns) in a relation.
  6. Cardinality: the number of tuples (rows) in a relation.

Example: In the STUDENT table above, there are 3 columns (Roll No, Name, Class), so the degree is 3; and there are 2 rows, so the cardinality is 2.

Importance of Tuples in the Relational Model

  1. A tuple represents one complete record of real-world data (one student, one product, one order).
  2. All tuples in a relation have the same attributes (the same structure).
  3. The order of tuples in a relation does not matter โ€” a relation is a set of tuples.
  4. Each tuple is usually uniquely identified by a primary key (such as Roll No).
  5. Operations like insert, delete and update work on tuples.

So, the tuple is the basic unit of data storage in a relational database.

Questions and Answers

What is a tuple in DBMS?+

A tuple in DBMS is a single row or record of a relation (table) in the relational model. It contains a set of related values โ€” one for each attribute (column) โ€” that together describe one entity, such as the details of one student or one employee. A tuple is also called a record or a row.

What is the difference between a tuple and an attribute?+

A tuple is a horizontal row of a relation, representing one complete record. An attribute is a vertical column of the relation, representing one property or field (such as 'Name' or 'Class'). In short, a tuple is a row and an attribute is a column.

What are degree and cardinality in DBMS?+

Degree is the number of attributes (columns) in a relation, and cardinality is the number of tuples (rows) in a relation. For example, a table with 3 columns and 5 rows has a degree of 3 and a cardinality of 5.

Is a tuple the same as a row?+

Yes. In the relational model of a DBMS, a tuple is the same as a row of a table. It is also called a record. Each tuple/row holds one complete set of related data values for all the attributes of the relation.

More in Computer Science

Study Smarter with Shinyu.ai

Turn this guide into revision flashcards, a practice exam, or an AI-generated podcast โ€” free, no signup required.