52.0k views
0 votes
Consider a set of functional dependencies F = {AB → AC, C → AD} that hold on a relation schema R(A, B, C, D).

a) Show the steps of computing a canonical cover for F.
b) Determine whether or not AD is a candidate key using the transitive closure of
some attributes.
c) Assume that R is decomposed into R1(A, B) and R2(A, C, D). Is this decomposition
dependency preserving? Justify your answer.
d) Determine whether or not R(A, B, C, D) is in BCNF and justify your answer using
the transitive closure of a set of attributes. If R(A, B, C, D) is not in BCNF, find a BCNF decomposition of it.

User Fpmurphy
by
7.7k points

1 Answer

3 votes

Final answer:

a) Steps to compute canonical cover: eliminate redundant dependencies, eliminate extraneous attributes. b) AD is a candidate key if its closure includes all attributes. c) The decomposition is dependency preserving if the functional dependencies on R can be derived from R1 and R2. d) R is not in BCNF if the closure of any set of attributes is a proper superset of the attributes. BCNF decomposition can be done based on functional dependencies.

Step-by-step explanation:

a) Steps to compute a canonical cover for F:

  1. Eliminate redundant functional dependencies: In this case, no dependencies are redundant.
  2. Eliminate extraneous attributes: Start by finding the closure of each functional dependency. If an attribute is not in the closure of any other dependency, it can be removed. In this case, no attributes are extraneous.
  3. Repeat steps 1 and 2 until no further changes can be made.
  4. The resulting set of functional dependencies is the canonical cover.

b) To determine if AD is a candidate key:

  1. Compute the closure of AD. If the closure includes all attributes in the relation schema, AD is a candidate key.

c) To determine if the decomposition is dependency preserving:

  1. Check if the set of functional dependencies that hold on R can be derived from the functional dependencies that hold on R1 and R2. If they can, the decomposition is dependency preserving.

d) To determine if R is in BCNF:

  1. Compute the closure of each set of attributes based on the given functional dependencies. If the closure is a proper superset of the attributes, R is not in BCNF.

If R is not in BCNF, you can find a BCNF decomposition by creating new relations based on the functional dependencies and their closures.

User Anna Tolochko
by
8.3k points