AI engineering glossary · SQL databases

What is relational algebra?

Relational algebra: The formal set of operations on tables that underlies SQL: selection (filter rows), projection (pick columns), union, difference, product and join. Query optimisers rewrite queries using its equivalences. It gives SQL its mathematical foundation.

Level: advancedTopic: SQL databases

Relational algebra: an example

Selection by city = 'Pune' followed by projection onto name corresponds to SELECT name ... WHERE city = 'Pune'.

Related terms

More SQL databases terms

Where you learn it

Relational algebra is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.