Introduction to the Relational Model
The relational model, proposed by Edgar Codd in 1970, is the theoretical foundation of every RDBMS. It represents all data as relations, which are tables made of rows (tuples) and columns (attributes), and defines rules for a valid relation, such as every cell holding a single atomic value and every column having its own domain of legal values.
The relational model, proposed by Edgar Codd in 1970, is the theoretical foundation underneath every RDBMS. Its core idea is simple to state: represent all data as relations, formally, tables made of rows and columns, and define a small set of rules about what makes such a table valid and how tables can relate to each other.
Core concepts of the relational model
Relation. A relation is formally a table: a named set of rows (tuples), each with values for a fixed set of columns (attributes). Every table in an RDBMS is a relation in this formal sense.
Tuple. A single row in a relation, representing one instance of whatever the table models.
Attribute. A named column in the relation, with an associated domain (the set of legal values it can hold).
Degree and cardinality. The degree of a relation is its number of attributes (columns); its cardinality is its number of tuples (rows). These terms show up in formal discussions and some interview questions, though "cardinality" is also used more loosely elsewhere (like relationship cardinality in ER modeling), so context matters.
The formal properties of a valid relation
The relational model imposes real structural rules, not just "any table":
- Each cell holds a single, atomic value. No cell should hold a list or a nested set of values, this is directly the basis for First Normal Form.
- Each column has a single, consistent data type across every row.
- Each row is unique. No two rows in a relation should be identical, which is why every table should have a primary key.
- The order of rows and columns doesn't matter. A relation is conceptually a set, not a sequence; querying it shouldn't depend on physical row or column order (even though in practice a
SELECTwithoutORDER BYmay appear to have some order, that order isn't guaranteed by the model).
A worked example
Take this orders relation:
| order_id | customer_name | total |
|---|---|---|
| 1 | Priya | 450.00 |
| 2 | Aman | 220.50 |
This satisfies the relational model's rules: every cell holds one atomic value (no cell contains a list of multiple totals), every row is unique (identified by order_id), and each column has a consistent type across all rows (total is always a decimal number).
Now compare it to this version, which violates the model:
| order_id | customer_name | items |
|---|---|---|
| 1 | Priya | Keyboard, Mouse, Monitor |
Here, items holds multiple values crammed into a single cell, violating the atomic-value rule. This isn't a valid relation in the formal sense, and it's exactly the kind of design First Normal Form exists to fix, by pulling items out into its own separate table with one row per item instead.
Where this matters in real systems
Every time a schema designer avoids stuffing multiple values into one column, avoids duplicate rows, and gives every table a primary key, they're following the relational model's formal rules, whether they realize it explicitly or not. SQL itself is essentially an implementation of relational algebra, the formal query language Codd defined alongside the model, which is why operations like JOIN, SELECT (filtering), and PROJECT (choosing specific columns) map so directly onto SQL's own syntax.
What interviewers actually ask about the relational model
- "Who proposed the relational model, and roughly when?" Edgar Codd, in 1970, while working at IBM.
- "What does it mean for a value to be atomic in the relational model?" A cell holds exactly one indivisible value, not a list or set of multiple values.
- "What's the difference between degree and cardinality of a relation?" Degree is the number of columns (attributes); cardinality is the number of rows (tuples).
- "Why does every row in a relation need to be unique?" Because a relation is formally a set, and sets don't contain duplicate elements, this is also the practical reasoning behind requiring a primary key on every table.
Key takeaways
- The relational model, from Edgar Codd in 1970, represents all data as tables (relations) of rows (tuples) and columns (attributes).
- Its formal rules require atomic cell values, consistent column types, unique rows, and treat row/column order as irrelevant.
- Degree is a relation's number of columns; cardinality is its number of rows.
- SQL is essentially a practical implementation of the relational algebra Codd defined alongside the model.
More in RDBMS
Browse all DBMS topics
Log in to save which topics you've read across every subject.
Frequently asked questions
Who proposed the relational model, and roughly when?
Edgar Codd, in 1970, while working at IBM.
What does it mean for a value to be atomic in the relational model?
A cell holds exactly one indivisible value, not a list or set of multiple values.
What's the difference between degree and cardinality of a relation?
Degree is the number of columns (attributes); cardinality is the number of rows (tuples).
Why does every row in a relation need to be unique?
Because a relation is formally a set, and sets don't contain duplicate elements, this is also the practical reasoning behind requiring a primary key on every table.