Whenever a user updates the database, the system must check whether any of the functional dependencies are getting violated in this process. If there is a violation of dependencies in the new database state, the system must roll back. Working with a huge set of functional dependencies can cause unnecessary added computational time. This is where the canonical cover comes into play.
A canonical cover of a set of functional dependencies F is a simplified set of functional dependencies that has the same closure as the original set F.
Extraneous attributes: An attribute of a functional dependency is said to be extraneous if we can remove it without changing the closure of the set of functional dependencies.
Canonical cover: A canonical cover F_{c} of a set of functional dependencies F such that ALL the following properties are satisfied:
Finding Canonical Cover
Algorithm to compute canonical cover of set F:
repeat
Example 1:
Consider the following set F of functional dependencies:
F = {
A → BC
B → C
A → B
AB → C
}
Steps to find canonical cover:
Example 2:
Consider another set F of functional dependencies:
F = {
A → BC
CD → E
B → D
E → A
}
Note: There can be more than one canonical cover Fc of a set F of functional dependencies.
How to check whether a set of f.d.’s F canonically cover another set of f.d.’s G?
Consider the following two sets of functional dependencies:
F = {
A → B
AB → C
D → AC
D → E
}
G = {
A → BC
D → AB
}
Now, we are required to find out whether one of these f.d.’s canonically covers the other set of f.d.’s. This means, we need to find out whether F canonically covers G, G canonically covers F, or none of the two canonically cover the other.
To find out, we follow the following steps:
Now, do the same for G.
Now, since all f.d.’s of G are already covered in F, we conclude that F covers G.
62 videos|66 docs|35 tests
|
1. What is the concept of canonical cover in functional dependencies? |
2. How is the canonical cover helpful in database management systems (DBMS)? |
3. What steps are involved in finding the canonical cover of functional dependencies? |
4. How does the canonical cover contribute to database optimization? |
5. What is the significance of functional dependencies in database design? |
|
Explore Courses for Computer Science Engineering (CSE) exam
|