Information Technology · Ch 3 — Relational Database Management System
The Relational Model — Relations, Tuples and Attributes
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
Studenttable 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,ClassandMarksare attributes of aStudenttable. 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
Marksattribute 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:
| RollNo | Name | Class | Marks |
|---|---|---|---|
| 1 | Aarti Behera | XI-A | 78 |
| 2 | Rohan Das | XI-A | 85 |
| 3 | Sneha Mohanty | XI-B | 72 |
A collection of related data organised into rows and columns in a relational database; for example …
A single row of a relation holding one complete set of related values — for example, all the detai …
A single column of a relation representing one specific property of the data, such as RollNo or Name. All values in an attribut …
The degree of a relation is its number of attributes (columns); the cardinality is its number of tuples (ro …