IT lexicon › Programming › Relational Algebra

Relational Algebra

Programming På svenska → Updated: 2026-11-13

A mathematical formalism for querying relational databases using set-based operators.

Relational algebra, formalized by Ted Codd alongside the relational database model itself, is the mathematical foundation on which SQL rests. It defines operators like selection (filter rows), projection (choose columns), join (combine tables), and union — each takes one or two relations (tables) and produces a new relation as output. The SQL query SELECT * FROM users WHERE age > 30 is fundamentally a projection followed by a selection in relational algebra notation.

Relational algebra isn't something developers use directly — SQL is far more convenient — but it's the theory that guarantees the database engine can optimize queries correctly and produce reliable results. Understanding relational algebra is key to writing efficient queries and designing schemas that scale.

← Back to the lexicon