Theory and History: Why are Relational Databases “Relational”?

Many people wonder why relational databases are called "relational.” Some think that it's because of a logical entity-relationship model you often start your design with. Or, because you have tables and relationships (aka foreign keys) between them. But that's not the case.

The name comes from the mathematical notion of "relation." It all started with E. F. Codd who in 1970 (in the article A Relational Model of Data for Large Shared Data Banks) proposed something now called relational algebra as the mathematical foundation of databases.

Many people wonder why relational databases are called “relational.” Some think that it’s because of a logical entity-relationship model you often start your design with. Or, because you have tables and relationships (aka foreign keys) between them. But that’s not the case.

The name comes from the mathematical notion of “relation.” It all started with E. F. Codd who in 1970 (in the article A Relational Model of Data for Large Shared Data Banks) proposed something now called relational algebra as the mathematical foundation of databases.

In mathematics, a relation is a subset of a Cartesian product. A Cartesian product A × B is the set of all pairs (a,b) where a ∈ A, b ∈ B; a product A × B × C is the set of all triples (a,b,c) where a ∈ A, b ∈ B, c ∈ C; and so on. So, a relation between three sets is a certain set of triples. For example, a relation between the sets {0,1,2}, {0,1,2} and {-2,-1,0,1,2} may be defined like this:

If you’re used to thinking that a relation is something like “a divides b” or “a is less than b” then this approach might be difficult to understand. But the difference is really in your head [1]. Instead of giving explanation of a relation you enumerate the facts that hold. The relation r above is subtraction in {0,1,2}: (x,y,z) ∈ r if x-y = z. An infinite enumeration

is the definition of the relation “a is less than b.”

What does this have to do with databases?

You’ll see the connection, if I write the relation r like this:

Tools in this post

Redgate Data Modeler

Design, update, and manage database schemas

Find out more