DBMS Topics
Relational Model
Last Updated : 21 May, 2026
The relational model was proposed by Dr. E.F. Codd of IBM in 1970 in his landmark paper "A Relational Model of Data for Large Shared Data Banks." It is based on the mathe
Introduction
The relational model was proposed by Dr. E.F. Codd of IBM in 1970 in his landmark paper "A Relational Model of Data for Large Shared Data Banks." It is based on the mathematical concept of a relation (a set of tuples) and uses first-order predicate logic for its formal foundation.
The relational model is the foundation of all SQL databases.
Core Concepts
Relation (Table)
A relation is a two-dimensional table consisting of rows and columns. Each relation has:
- A unique name
- A fixed set of columns (attributes)
- An unordered set of rows (tuples)
| Relation | EMPLOYEE |
| Relation Name | EMPLOYEE |
| Degree (Arity) | 4 (number of columns) |
| Cardinality | 3 (number of rows) |
Attribute
An attribute is a named column in a relation. Each attribute has:
- A name (e.g., EmpID, Name)
- A domain — the set of valid values for that attribute
| EmpID | Domain: positive integers |
| Name | Domain: strings up to 100 characters |
| DeptID | Domain: integers (must exist in Department) |
| Salary | Domain: positive decimal numbers |
Tuple
A tuple is a single row in a relation — one instance of the entity. Each tuple has one value for each attribute (or NULL if the attribute is optional).
Domain
A domain is the set of all possible values for an attribute. Domains provide a semantic definition:
Schema vs. Instance (Relation)
Relation Schema
EMPLOYEE(EmpID: INT, Name: VARCHAR, DeptID: INT, Salary: DECIMAL)
Relation Instance (at a point in time)
{ (101, Alice, 1, 75000), (102, Bob, 2, 62000), (103, Carol, 1, 88000) }
Properties of a Relation
- Unique name: Each relation has a distinct name in the database.
- Unique attribute names: Each column within a relation has a unique name.
- Atomic attribute values: Each cell contains exactly one value (1NF).
- No duplicate tuples: Each row is unique (ensured by primary key).
- No ordering of rows: The physical order of rows doesn't matter.
- No ordering of columns: Columns are identified by name, not position.
- All values in a column come from the same domain.
Integrity Constraints
1. Domain Constraints
Every value in a column must come from the defined domain of that attribute.
2. Entity Integrity Constraint
The primary key of a relation cannot contain NULL values. Every tuple must be uniquely identifiable.
3. Referential Integrity Constraint
If a foreign key value exists in one relation, it must either:
- Match a primary key value in the referenced relation, OR
- Be NULL
| Employee.DeptID = 5 | Department must have a row with DeptID = 5 |
| Employee.DeptID = NULL | OK (employee not yet assigned) |
| Employee.DeptID = 99 | VIOLATION (DeptID 99 doesn't exist in Department) |
4. User-Defined Integrity Constraints
Business rules enforced via CHECK constraints:
CHECK (Salary > 0)CHECK (Age BETWEEN 18 AND 65)CHECK (Grade IN ('A', 'B', 'C', 'D', 'F'))
Relational Schema Notation
| RelationName(Attr1, Attr2, ..., AttrN) | Standard relation notation |
| EMPLOYEE(EmpID, Name, Salary, DeptID) | Keys are marked separately as PK/FK |
| Multiple Relations | Schemas are written as relation signatures |
Codd's 12 Rules (Brief Overview)
E.F. Codd defined 12 rules (Rule 0 to Rule 12) that a DBMS must satisfy to be considered fully relational. Key rules include:
- Rule 1: All data must be represented in tables
- Rule 2: Guaranteed access to any data by table name + primary key + column name
- Rule 6: View updating — all theoretically updateable views must be updatable
- Rule 9: Logical data independence
- Rule 10: Physical data independence
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Relational Model.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this DBMS topic.
Search Terms
dbms, database management system, database notes, sql, unit, relational, model, relational model
Related DBMS Topics