Which of the FDs are correct for R to be in BCNF?, BoyceCodd Normal Form
Question:
13. Let us consider a
relation R with the schema R (A, B, C, D). If we expect R to be in BCNF, then
which of the following sets of functional dependencies must hold in R?
(a) A → C, A
→ D, AD → C, B → A
(b) C → B, C
→ D, A → C, D → A
(c) C → D, CD → A, BD →
A, AB → C
(d) A → D, C → A, AC →
B, D → B
Answer:
(b) C → B, C → D, A → C, D → A
Discussion/Reason:
For a relation to
be in BCNF, then all the FDs must have candidate keys on their left hand side.
Let us find the
closure (refer here for attribute closure) for LHS of each FD of option (b).
Closure of C (C^{+})

FD causes the result

result = CB

C → B

result = CBD

C → D

result = CBDA

D → A

From the above
table, the result of closure of C = ABCD = R. Hence, C is one of the candidate
keys.
Closure of A (A^{+})

FD causes the result

result = AC

A → C

result = ACB

C → B

result = ACBD

C → D

From the above
table, the result of closure of A = ABCD = R. Hence, A is one of the candidate
keys.
Closure of D (D^{+})

FD causes the result

result = DA

D → A

result = DAC

A → C

result = DACB

C → B

From the above
table, the result of closure of D = ABCD = R. Hence, D is one of the candidate
keys.
For option (b), all
the FDs left hand sides are candidate keys. So, R should hold these FDs to be
in Boyce Codd Normal Form.
You try for other
FDs given in other options. The LHS will not form a key.
Go to Multiple choices questions page
No comments:
Post a Comment