Advanced Database Management System - Tutorials and Notes: Find the closure of set of attributes

Search Engine

Please visit, subscribe and share 10 Minutes Lectures in Computer Science

Sunday, 8 May 2016

Find the closure of set of attributes

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






How to find closure of set of attributes

Quiz questions on closure

interview questions on database closures


No comments:

Post a comment

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents