- Advanced
- About 12 min
- 5 practice questions
Database concepts and the relational model
Define database, DBMS, table, record, field and the terms used in the relational model such as tuple, attribute, degree and cardinality.
If something looks wrong, please tell us.
A database is an organised collection of related data. A DBMS (Database Management System) is the software that stores, retrieves and protects that data. Compared with scattered files, a DBMS reduces repeated data and keeps data consistent.
Relational model terms
| Everyday term | Formal term | Meaning |
|---|---|---|
| Table | Relation | Data arranged in rows and columns |
| Row / record | Tuple | One entry, such as one student |
| Column / field | Attribute | One property, such as name |
| Number of columns | Degree | Count of attributes |
| Number of rows | Cardinality | Count of tuples |
| Set of allowed values | Domain | Values an attribute may take |
Advantages of a DBMS
- Less redundancy (repeated data).
- Better consistency and integrity.
- Data sharing with controlled access and security.
- Backup and recovery support.
Worked example 1: degree and cardinality
A table STUDENT has columns RollNo, Name, Class, City and 35 rows. Degree = number of columns = 4. Cardinality = number of rows = 35. If 5 rows are deleted, the cardinality becomes 30 while the degree remains 4.
Worked example 2: redundancy
A school stores a student's address in both the library file and the fees file. If the address changes and only one file is updated, the two files disagree: this is inconsistency caused by redundancy. A single shared database table avoids this by storing the address once.
Degree = columns. Cardinality = rows.
Key takeaways
- Relation = table, tuple = row, attribute = column.
- Degree counts columns; cardinality counts rows.
- A DBMS reduces redundancy and inconsistency.
Check your understanding
-
1. A table has 6 columns and 120 rows. What is its degree?
- 6
- 120
- 126
- 720
Show answer
Answer: A. Degree is the number of columns (attributes): 6. Cardinality would be 120.
-
2. Table STUDENT has 4 columns and 35 rows. Five rows are deleted. What are its cardinality and degree now?
- Cardinality 4, degree 30
- Cardinality 30, degree 4
- Cardinality 35, degree 4
- Cardinality 30, degree 9
Show answer
Answer: B. Cardinality counts rows: 35 - 5 = 30. Deleting rows does not change the columns, so degree stays 4.
-
3. In the relational model, a row of a table is formally called a
- Attribute
- Domain
- Tuple
- Relation
Show answer
Answer: C. Row = tuple, column = attribute, table = relation.
-
4. The set of values an attribute is allowed to take is its
- Degree
- Cardinality
- Tuple
- Domain
Show answer
Answer: D. The domain is the set of allowed values for an attribute.
-
5. A student's address is kept in both the library file and the fees file. Only one is updated, so the files disagree. What is this?
- Inconsistency caused by redundancy
- Durability
- Normalisation
- Referential integrity
Show answer
Answer: A. Storing the same data twice (redundancy) allowed the copies to disagree (inconsistency).
Sign in to keep track of the lessons you finish.