4.4k views
2 votes
Suppose you are given a relation R(A,B,C,D). For each of the following sets of FDs (labelled as (i), (ii), (iii) below), assuming they are the only dependencies that hold in R, do the following:

(a) Identify the candidate key(s) in R.
(b) State whether the proposed decomposition of R is good or not, and briefly explain why or why not.
i. B→C,D→A; decompose into BC and AD.
ii. AB→C,C→A,C→D; decompose into ACD and BC.
iii. A→BC,C→AD; decompose into ABC and AD.

1 Answer

5 votes

Final answer:

The candidate keys and goodness of proposed decompositions for different sets of functional dependencies are discussed.

Step-by-step explanation:

(i) For the set of functional dependencies B→C and D→A, the candidate key(s) in R would be BD. The proposed decomposition of R into BC and AD is good because BC is a candidate key and AD is functionally dependent on BC, preserving all the functional dependencies in R.

(ii) For the set of functional dependencies AB→C, C→A, and C→D, the candidate key(s) in R would be AB. The proposed decomposition of R into ACD and BC is good because ACD is a candidate key and BC is functionally dependent on ACD, preserving all the functional dependencies in R.

(iii) For the set of functional dependencies A→BC and C→AD, the candidate key(s) in R would be AC. The proposed decomposition of R into ABC and AD is not good because the dependency C→AD is lost in the decomposition.

User ErraticFox
by
8.7k points