Closure of functional Dependency & Attribute closure - Theory steps with examples

 Closure of a functional dependency


  • It refers to the set of functional dependencies that can be inferred from a given set of functional dependencies.
  • It is the process of finding all the functional dependencies that can be derived from the
  • original set of functional dependencies, using the properties of functional dependencies.
  • The closure of functional dependencies is important in normalization, as it helps identify redundant data and improve the efficiency of database operations.

Steps to Functional Dependency Closure

Step 1: Start with original Functional dependency set

Step 2: Add Functional dependencies that can be derived due to transitivity

Step 3: Repeat step 2 till all transitivity's are resolved

Example 1):

Let A, B, C and D be attributes and the set of FDs is as follows:

FD= {A -> B, B -> CD}

The closure of this set of functional dependencies is

FD+ ={A -> B, B -> CD, A -> CD}.


Example 2)

FD1 : Roll_No 🡪 Name, Marks

FD2 : Name 🡪 Marks, Location

Step 1: Add attributes present on the LHS of the first functional dependency to the
closure.

{Roll_no}+ = {Roll_No}

{Name}+ = {Name}


FD1 : Roll_No 🡪 Name

FD2 : Name 🡪 Marks, Location

Step 2: Add attributes present on the RHS of the original functional dependency to the
closure.

{Roll_no}+ = {Roll_No, Name }

{Name}+ = {Name, Marks, Location}


FD1 : Roll_No 🡪 Name

FD2 : Name 🡪 Marks, Location

Step 3: Add the other possible attributes which can be derived using due to transitivity

{Roll_no}+ = {Roll_No, Name, Marks, Location }

{Name}+ = {Name, Marks, Location}


Attribute Closure

Attribute Closure of an attribute set is defined as a set of all attributes that
can be functionally determined from it.

The closure of an attribute is represented as +

Steps to Calculate Attribute Closure

Step 1: Add attributes present on the LHS of the first functional dependency to the
closure.

Step 2: Add attributes present on the RHS of the original functional dependency to the
closure.

Step 3: Add the other possible attributes which can be derived using due to transitivity


Post a Comment

Previous Post Next Post