|< < 32 > >|

Divide

  • The last operation of relational algebra.

  • Often overlooked.

  • Never used in practice.

So why does it exist?

  • In early days of the relational model, there was another language approach: relational calculus.

  • Based on predicate calculus, which has two quantifiers
    • : There exists a tuple for which a given condition is true.
    • : For all tuples, a given condition is true.

  • Obvious question: which query language (approach) is better? Are there any queries that can be expressed in one language but not the other?

  • Answer: Relational algebra and relational calculus are equally expressive.

  • But this is only true if the relational algebra includes a counterpart to ∀.

  • Division is that counterpart.

|< < 32 > >|