Skip to content

Information Technology · Ch 3 — Relational Database Management System

The Relational Model — Relations, Tuples and Attributes

3

The Relational Model — Relations, Tuples and Attributes

A database model describes the logical structure of a database — how the data is organised and how different pieces of data relate to one another. Several models exist (hierarchical, network, relational, object-oriented), but the one that matters most for business applications is the relational model, proposed by E. F. Codd.

In the relational model, data is stored in tables. It is worth learning the exact vocabulary, because these words are used constantly:

  • A relation (table) is a collection of related data arranged in rows and columns, rather like a grid on paper. For example, a Student table stores data about students.
  • An attribute (field / column) is a single column of the table. It represents one specific property of the data — for example, RollNo, Name, Class and Marks are attributes of a Student table. Every value in a column is of the same kind.
  • A tuple (record / row) is a single row of the table. It holds one complete set of related values — for example, all the details of one particular student. If a table has 40 students, it has 40 tuples.
  • A domain is the set of permitted values for an attribute — for example, the domain of a Marks attribute might be whole numbers from 0 to 100.
  • The degree of a relation is the number of attributes (columns) it has, and the cardinality is the number of tuples (rows) it currently holds.

A small Student table might look like this:

RollNoNameClassMarks
1Aarti BeheraXI-A78
2Rohan DasXI-A85
3Sneha MohantyXI-B72
Definition 1Relation (table)

A collection of related data organised into rows and columns in a relational database; for example …

Definition 2Tuple (record / row)

A single row of a relation holding one complete set of related values — for example, all the detai …

Definition 3Attribute (field / column)

A single column of a relation representing one specific property of the data, such as RollNo or Name. All values in an attribut …

Definition 4Degree and cardinality

The degree of a relation is its number of attributes (columns); the cardinality is its number of tuples (ro …