Canonical Cover Of Functional Dependency

DBMS Tutorial


[fblike]

Canonical Cover Of Functional Dependency: Introduction

  • In any relational model, there exists a set of functional dependencies. These functional dependencies when closely observed might contain redundant attributes. The ability of removing these redundant attributes without affecting the capabilities of the functional dependency is known as “canonical cover of functional dependency”.
  • Canonical cover of functional dependency is sometimes also referred to as “minimal cover”. There are three steps to calculate the canonical cover for a relational schema having set of functional dependencies. We will cover the steps with an example below.
  • Canonical cover of functional dependency is denoted using "Mc".

 

Canonical Cover Of Functional Dependency : Example

  • Consider a relation R(A,B,C,D) having some attributes and below are mentioned functional dependencies.

FD1 : B  A

FD2 : AD  C

FD3 : C  ABD

 

Step-1 : Decompose the functional dependencies using Decomposition rule(Armstrong’s Axiom) i.e. single attribute on right hand side.

FD1 : B A

FD2 : AD C

FD3 : C A

FD4 : C B

FD5 : C D

 

Step-2 : Remove extraneous attributes from LHS of functional dependencies by calculating the closure of FD’s having two or more attributes on LHS.

Here, only one FD has two or more attributes of LHS i.e. AD C.

{A}+ = {A}

{D}+ ={D}

In this case, attribute “A” can only determine “A” and “D” can only determine “D”. Hence, no extraneous attributes are present and the FD will remain the same and will not be removed.

 

Step-3 : Remove FD’s having transitivity.

FD1 : B A

FD2 : C A

FD3 : C B

FD4 : AD C

FD5 : C D

Above FD1, FD2 and FD3 are forming transitive pair. Hence, using Armstrong’s law of transitivity i.e. if X Y, Y X  then X Z should be removed. Therefore we will have the following FD’s left :

FD1 : B A

FD2 : C B

FD3 : AD C

FD4 : C D

 

Also, FD2 & FD4 can be clubbed together now. Hence, the canonical cover of the relation R(A,B,C,D) will be:

Mc {R(ABCD)} = {B A , C BD, AD C}