Functional Dependencies
A constraint between two sets of attributes related to a database A functional dependency is shown by an arrow ( ). If attribute A functionally determines attribute B, it is written as AB.
Trivial Functional Dependency
A functional dependency AB is trivial only when B is a subset of A.
Example:
ABCâ†’A
ABâ†’B
ABCâ†’ABC
Non Trivial Functional Dependency
AB is a functional dependency when B is not a subset of A. It is called completely nontrivial when AB is NULL.
Semi NonTrivial Functional Dependency
AB is nontrivial when Aâˆ©B is not NULL.
Canonical Cover
When updating a database, the system's role is to ensure that no current functional dependencies are broken in the process. In the event that the new database state violates functional dependencies, the system must be rolled back.
Irreducible functional relationships or a canonical cover FD is a reduced version of FD with a comparable closure to the original FD set.
Important terms:
Extraneous attributes
If we can delete an attribute of a functional dependency without modifying the closure of the set of functional dependencies, it is said to be unnecessary.
Canonical cover
Canonical cover Fc is a set of functional dependencies F such that the following properties are not violated:
 All dependencies in Fc are logically implied by F.
 All dependencies in F are logically implied by Fc.
 There are no extraneous attributes in Fc's functional dependencies.
 Each functional dependency's left side in Fc is distinct. There are no two dependencies É‘1â†’Î²1 and É‘2â†’Î²2 in such that É‘1â†’É‘2.
Also See, File System vs DBMS
How to Find Canonical Cover
Following is an Algorithm to determine the Canonical cover of set F:
repeat
 Replace any dependencies in É‘1â†’Î²1 and É‘1â†’Î²2. with É‘1â†’Î²1Î²2 using the union rule.
 With an extraneous attribute, either in É‘ or Î² find a functional dependency É‘â†’Î².
 Delete any extraneous attribute found in É‘â†’Î².
until F does not change.
Example 1:
Consider the following set of functional dependencies:
F = {
Xâ†’YZ
Yâ†’Z
Xâ†’Y
XYâ†’Z
}
According to the steps mentioned above:
1. The two functional dependencies
Xâ†’YZ
Xâ†’Y
with same attributes on the left can be combined to get
Xâ†’YZ.
Now, the new set is:
F = {
Xâ†’YZ
Yâ†’Z
XYâ†’Z
}
2. XYZ is an extraneous attribute because we get the same closures even after removing it from the set. It is since Yâ†’Z is already part of F.
The new set F comes out to be:
F = {
Xâ†’YZ
Yâ†’Z
}
3. Xâ†’Y is logically suggested by Xâ†’Y and Yâ†’Z, yet Z is an extraneous Xâ†’YZ attribute (transitivity).
F = {
Xâ†’Y
Yâ†’Z
}
4. F does not change anymore after this step. The required Canonical cover is,
F = {
Xâ†’Y
Yâ†’Z
}
Example 2:
Consider another set of functional dependencies:
F={
Aâ†’BC
CDâ†’E
Bâ†’D
Eâ†’A
}
According to the algorithm:
 Each functional dependency in F has a distinct left side.
 There are no extraneous attributes on the left or right sides of any functional dependency (Checked by applying the definition of extraneous attributes on every functional dependency).
 Hence, the canonical cover Fc is equal to F.
How to verify if a set of f.dâ€™s F canonically covers a set of f.dâ€™s G?
Consider the two sets of functional dependencies:
F={
Aâ†’B
ABâ†’C
Dâ†’AC
Dâ†’E
}
G={
Aâ†’BC
Dâ†’AB
}
We must now determine whether one of these f.d.â€™s canonically covers the other set of f.d.â€™s. We must decide if F canonically covers G, G canonically covers F, or neither of the two canonically covers the other.
1. Make a singleton on the right side. This indicates that all of the characteristics on the right side of the f.d. arrow must be singletons.
Functional interdependence The functional dependencies Dâ†’A and Dâ†’C are separated from Dâ†’AC.
F={
Aâ†’B
ABâ†’C
Dâ†’A
Dâ†’C
Dâ†’E
}
2. Remove any extraneous attributes that aren't necessary.
Consider any XYâ†’Z functional dependence. If X can determine Z by itself, then the attribute Y is extraneous and can be deleted. As can be seen, unnecessary attributes can only exist in functional relationships with many attributes in the LHS.
Take the functional dependency ABâ†’C as an example.
To determine whether any of them are superfluous, we must first find the closures of A and B.
[A]+ = AB
[B]+ = B
As can be seen, B can be deduced from A. This means that B can be removed from the functional dependency ABâ†’C.
F={
Aâ†’B
Aâ†’C
Dâ†’A
Dâ†’C
Dâ†’E
}
Remove all functional dependencies that are no longer needed.
Check all f.d.â€™s one by one to verify if eliminating an f.d. Xâ†’Y still allows us to deduce Y from X using another f.d. We are testing and checking whether Y is a component of the closure without using the f.d. A more formal way to describe this is to find [X]+ without using the f.d. If this is the case, the f.d. is no longer necessary.
When looking for the f.d. D â†’ C, we notice that the closure of D contains C even after it has been hidden. By combining two other f.d.â€™s Dâ†’A and Aâ†’C, we can get C from D. As a result, â†’C is redundant.
Now, repeat the steps for G.
1. Make a singleton on the right side. This indicates that all of the characteristics on the right side of the f.d. arrow must be singletons.
G = {
Aâ†’B
Aâ†’C
Dâ†’A
Dâ†’B
}
2. Remove any extraneous attributes that aren't necessary. There can be no unnecessary attributes because the RHS of all f.d's has only one attribute.
3. Remove all functional dependencies that are no longer needed.
We can see that the f.d. Dâ†’B is redundant because it can be obtained by combining two other f.d .'s, Dâ†’A and Aâ†’B. By looping over all f.d's and checking the closure of the LHS in all cases, we can see that the f.d. Dâ†’B is redundant because it can be obtained by combining two other f.d .'s, Dâ†’A and Aâ†’B.
G={
Aâ†’B
Aâ†’C
Dâ†’A
}
As we can see that all Gâ€™s f.d.â€™s are already covered in F, we conclude that F covers G.
How Canonical Cover works in DBMS?
Canonical Cover in DBMS works by removing redundant functional dependencies while preserving the same meaning and integrity constraints. The process involves finding the closure of the given set of functional dependencies, removing extraneous dependencies, and then ensuring that the remaining set of dependencies is minimal and irreducible. The resulting set is equivalent to the original set and can be used to design a normalized database schema that is free from redundancies and inconsistencies.
Must Recommended Topic, Schema in DBMS
Features of the Canonical Cover
The Canonical Cover is a critical concept in database normalization, offering several key features for efficient data storage and retrieval:

Minimized Functional Dependencies (FDs): It represents the smallest set of FDs necessary to derive all others in a relation, ensuring compactness

Preservation of FDs: The Canonical Cover maintains the original FDs, guaranteeing that all essential dependencies are preserved

Redundancy Elimination: Redundant FDs, derivable from others, are removed, resulting in a more streamlined data representation

Key Identification: The Canonical Cover aids in determining superkeys and candidate keys, crucial for database design and normalization

Dependency Set Simplification: It streamlines FD sets by removing unnecessary attributes, simplifying database operations

Facilitates Database Design: By providing a clean, minimal set of FDs, the Canonical Cover assists in designing databases with reduced redundancy and enhanced efficiency

Query Optimization: Canonical Cover minimizes the attributes involved in FDs, potentially leading to more efficient query execution plans.ns
Also read anomalies in database
Frequently Asked Questions
What is the use of canonical cover?
The use of canonical cover in DBMS is to identify a minimal, irreducible set of functional dependencies that is equivalent to the original set of dependencies. This helps reduce redundancy and simplify the design of a database, resulting in better performance and easier maintenance.
What is canonical cover and minimal cover in DBMS?
In DBMS, a canonical cover is a set of functional dependencies that is minimal, irreducible, and equivalent to the original set of dependencies. A minimal cover is a set of dependencies that is minimal but not necessarily irreducible.
What is canonical form in functional dependency?
In the context of functional dependencies, a canonical form is a form of normalization in which every determinant of a relation is a candidate key, and there are no nontrivial functional dependencies between candidate keys.
What is the necessity for canonical cover in RDBMS?
A canonical cover is a simplified and reduced form of a set of functional dependencies in a database management system. It's also known as an irreducible set because it's a reduced version.
Conclusion
In the article, we briefly discussed the Normalization of databases, Functional dependencies, and Canonical Covers. We came to know about various essential terms of Canonical Cover in DBMS. Then we learned about the algorithm to determine the Canonical covers with the help of Examples. After that, we learned How to verify if a set of f.dâ€™s F canonically covers a set of f.dâ€™s G.
Do check out The Interview guide for Product Based Companies as well as some of the Popular interview problems from top tech companies like Amazon, Adobe, Google, Uber, Microsoft, etc. on Coding Ninjas Studio.
You can also consider our Database Management Course to give your career an edge over others.