Definition
Closure (Relational Algebra)
The set of all functional dependencies
which can be derived by inference from a set of functional dependencies is called the closure of . The derivation is based Armstrong’s axioms This remembers me of the linear span from linear algebra, which is the set of all vector that can be constructed from a set of basis vectors.
Minimal Cover
A minimal cover
(see set equivalence of functional dependencies). - There is no functional dependency
, where or contains redundant attributes, thus:
- Every left side of a functional dependency in
is unique. By applying composition, is replaced by .
To test efficiently that
is redundant if (attribute closure) - left reduction is redundant if (attribute closure) - right reduction
Example:
Given the following set of functional dependencies:
We first set
-
Compose the left side to be unique. Since there are no duplicate left sides in
, nothing needs to be done. -
Left reduction: Replace
by . This is possible due to transitivity: . The updated is:
- Right reduction: Replace
by since can already be reached by . The updated is:
- Again, compose the left side to be unique. We have two
‘s, using composition: