Relational Algebra

<aside> πŸ’‘

Essentially a mathematical system that allows us to manipulate relations/tables through a series of operations.

Behind the scenes, SQL transforms queries into relational algebra in order to retrieve results.

</aside>

Consists of;

Set Operations

Selection β€” Sel[expr](Rel)

Projection β€” Proj[A,B](Rel)

Rename β€” Rename[schema](Rel)

Union β€” R1 Union R2

Intersection β€” R1 Intersect R2

Difference β€” R1 - R2

Cartesian Product β€” R1 x R2

Natural Join β€” R1 Join R2

Theta Join β€” R1 Join[cond] R2

Division β€” R1 Div R2