641 views
0 votes
0 votes
how many foeign key required for the following relation R(ABCDEF) with FD's( AB->C, BC->A, AC->B, D->E) into BCNF and lossless join, dependency preserving decomposition?

a)1

b)2

c)3

d)4

1 Answer

Best answer
7 votes
7 votes

Here we have to do the decomposition carefully..

Let us have S(A,B,C) that contains the following FDs :

AB --> C

BC --> A

AC --> B

Hence all the determinants(lhs terms) are candidate keys and hence superkeys..And hence it follows BCNF rule.

Now we have one fd remaining D --> E so let us have that in T(D,E) ..having D as the candidate key and hence superkey..

But still we have the attribute F which is not yet covered .But we cannot include them in either S or T subrelation as that will violate the BCNF rule as F has to be a part of superkey and hence BCNF form will be violated if we try to preserve FDs of R relation..And if we try to preserve BCNF property , then the FDs will be violated..Hence we have to place the attribute F in separate table ,   say W..

Now to make lossless we add the attributes A,B or A,C or B,C and D to W to make it W(A,B,D,F) or W(A,C,D,F) or W(B,C,D,F) and this subrelation is also in BCNF as it has no non trivial FDs..

So W table will have 2 foreign keys one referencing to S and other referencing to T subrelation..

So no of foreign keys required = 2

Hence B) is the correct option..

selected by

No related questions found