Closure of FD set


Closure of Functional Dependency

The set of all those attributes which can be functionally determined from given functional dependencies.

The closure for functional dependency, F can be denoted as {F}+ 

Steps to calculate closure of functional dependency:

Step-1: Add the attributes present on left-hand side inside the functional dependency

Step-2: Now, add the attributes which are present on the right-hand side of the functional dependency.

Step-3: Now, from the existing attributes within the right-hand side set, check other attributes that can be derived from the given functional dependencies. Repeat this process until all the possible attributes are derived and added in the closure set.

For an example: 
Consider a relation R(A,B,C) having below mentioned functional dependencies.
FD1 : A -> B
FD2 : B -> C
Now, let us calculate closure for all the attributes present in the relation R.

{A}+  =   {A}
                {A,B}
                {A,B,C}
{B}+ =    {B}
                {B,C}
{C}+ =    {C}

So, we can say from the above solution, that {A} is the candidate key as its closure contains all the attributes present in the relation R.

Note: In case, if single attribute is not able to determine the candidate key, then we can find closure by combining two or more attributes to derive the candidate key. 

Comments

Popular posts from this blog

Transaction State Diagram

Closure of Attributes

Functional Dependency