## Find the closure of set of attributes, Check whether the given attributes forms candidate keys, How to find closure of attributes? Find closure - solved exercise

__Question:__**1. Let F = {A → B, AB → E, BG → E, CD → I, E → C}. The closures, A**

^{+}, (AE)^{+}and (ADE)^{+}will be ________.

__Solution:__Closure:
In simple terms,
if you know an attribute (or set of
attributes) in a relation R, then what other attribute (or set of attributes)
you would determine uniquely is called the closure. We normally find the
closure of left hand side (LHS) attributes of the functional dependencies of
relation R. Closure is used to find the candidate keys of the relation. Refer here to know more about attribute closure. |

__To find A__^{+}:
result := A

If you know A, then you would know AB
from the functional dependency (FD) A → B.

result := AB

If you know AB, then you would know
ABE from the FD AB → E.

result := ABE

If you know ABE, then you would know ABEC
from the FD E → C.

result := ABCE

We have included all the LHS of given functional
dependencies. No FDs of left hand that has ABCE in it. Hence, our algorithm
stops at this point. And

**the closure is ABCE**.

__To find (AE)__^{+}:
result := AE

result := ABE from the FD A → B

result := ABCE from the FD E → C.

We cannot move further. Hence,

**the closure is ABCE**.

__To find (ADE)+:__
result := ADE

result := ABDE from the FD A → B

result := ABCDE from the FD E → C

result := ABCDEI from the FD CD → I

We cannot move further. Hence, the closure is ABCDEI.

The closures are;

**A+ = ABCE**

**(AE)+ = ABCE**

**(ADE)+ = ABCEDI**

****************

Go back to

**Question/QUIZ page**
Go back to

**Online Quizzes home page**