Relational division expresses an all-required-matches query. Let be a database relation, the required values and an explicit candidate database relation. The desired result is
It can be constructed using Cartesian product, relational projection and relational difference:
The inner relational difference contains missing required pairs. Its relational projection identifies failing candidates; removing them from proves the formula.
For example, can record scientific instrument/test pairs and the required tests. An scientific instrument with both pairs passes; one with only the heat pair does not. This is a universal quantifier requirement, unlike an ordinary relational join asking for some match.
When is empty, vacuous truth gives . Choosing is conventional but cannot recover candidates absent from ; use an independently stored scientific instrument database relation if those candidates must be included. Stating the candidate universe makes this edge case unambiguous.

Articles by others on the same topic (0)

There are currently no matching articles.