0
$\begingroup$

I encountered the following question:

Given a relation R(A, B, C, D) with the following functional dependencies:
A -> B, C -> D, B -> C.

The BCNF Decomposition of R is:

A) {(A,B), (C,D), (B,C)}
B) {(A,B), (C,D), (A,C)}
C) {(B,C), (A,D), (A,B)}
D) All of the above

According to my understanding the solution should be D) ALL of the above.
This is because for each schema, the condition for BCNF holds as given by this link: http://www.cs.sfu.ca/CourseCentral/354/jpei/slides/UsingBCNF-3NF.pdf (Page 18)

The other two do not preserve some dependencies but in BCNF decomposition it may happen that the dependencies are not preserved.

However, the answer is given as (A). Please can someone explain? Thanks.

$\endgroup$

1 Answer 1

0
+100
$\begingroup$

For the relation R(A, B, C, D) with the following functional dependencies:

1.A -> B
2.C -> D
3.B -> C

candidate key = A

The correct way to decompose a relation such that it satisfies BCNF property is following.

The FD 2 and 3 are violating the BCNF property(LHS should be key) i.e to convert the relation into BCNF it is needed to be decomposed.

To decompose this find the FD which violates the BCNF property in our case FD 2 and 3 violates.

Seprate out this FD into a different relation i.e our new relation is

R1 = (A,B) with FD A-> B
R2 = (B,C,D) with FD B->C and C->D

Again for the R2 the key is B and FD C->D violates the BCNF property we further split R2 into R12 and R22

R12  = (B,C) with FD B->C
R22  = (C,D) with FD C->D

Now the final obtained relation after decomposition is

R1 = (A,B) with FD A-> B
R12  = (B,C) with FD B->C
R22  = (C,D) with FD C->D

The above relations are the only decomposition of R that satisfies BCNF property.

For more insights refer this http://www.cs.toronto.edu/~faye/343/f07/lectures/wk12/moreBCNF.pdf

$\endgroup$
3
  • $\begingroup$ Thanks for the response. My confusion lies in the part as to why the other options not considered to be in BCNF. $\endgroup$ Commented Nov 23, 2014 at 9:44
  • $\begingroup$ The other option are correct only if you are asked which relation are in BCNF but the questions ask for given a relation R which is not in BCNF what relations would be in BCNF after decomposition of R $\endgroup$ Commented Nov 23, 2014 at 10:27
  • $\begingroup$ OK, yes I think that is very logical. Thank you! $\endgroup$ Commented Nov 24, 2014 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.