In relational database theory, a canonical cover, also known as minimal cover, Fc for F (a set of functional dependencies on a relation scheme) is a set of dependencies such that F logically implies all dependencies in Fc, and Fc logically implies all dependencies in F. The set Fc has two important properties:
No functional dependency in Fc contains an extraneous attribute. Each left side of a functional dependency in Fc is unique. That is, there are no two dependencies a→b and c→d in Fc such that a=c. A canonical cover is not unique for a given set of functional dependencies, therefore one set F can have multiple covers Fc.
Algorithm for computing a canonical cover Fc=F Repeat: Use the union rule to replace any dependencies in Fc of the form a→b and a→d with a→bd. Find a functional dependency in Fc with an extraneous attribute and delete it from Fc ... until Fc does not change
Canonical cover example In the following example, Fc is the canonical cover of F. Given the following, we can find the canonical cover: R = (A, B, C, G, H, I), F = {A→BC, B→C, A→B, AB→C}
{A → BC, B → C, A → B, AB → C} {A → BC, B → C, AB → C} {A → BC, B → C} {A → B, B →C} Fc = {A → B, B → C}
Extraneous attributes An attribute is extraneous in a functional dependency if its removal from that functional dependency does not alter the closure of any attributes.
Extraneous determinant attributes Given a set of functional dependencies F and a functional dependency A→B in F, the attribute a is extraneous in A if a⊂A and any of the functional dependencies in (F−(A→B)∪(A−a)→B) can be implied by F using Armstrong's Axioms. Using an alternate method, given the set of functional dependencies F, and a functional dependency X → A in F, attribute Y is extraneous in X if Y⊆X, and (X−Y)+⊇A. For example:
If F = {A → C, AB → C}, B is extraneous in AB → C because A → C can be inferred even after deleting B. This is true because if A functionally determines C, then AB also functionally determines C. If F = {A → D, D → C, AB → C}, B is extraneous in AB → C because {A → D, D → C, AB → C} logically implies A → C.
Extraneous dependent attributes Given a set of functional dependencies F and a functional dependency A→B in F, the attribute a is extraneous in A if a⊂A and any of the functional dependencies in (F−(A→B)∪{A→(B−a)}) can be implied by F using Armstrong's axioms. A dependent attribute of a functional dependency is extraneous if we can remove it without changing the closure of the set of determinant attributes in that functional dependency. For example:
If F = {A → C, AB → CD}, C is extraneous in AB → CD because AB → C can be inferred even after deleting C. If F = {A → BC, B → C}, C is extraneous in A → BC because A → C can be inferred even after deleting C.
References