Question

# Question 2 (Functional Dependencies - Closure) [37 points] (a) [10 points] Consider the relation schema R(A,B,C,D,E,F) with the functional dependencies F = {A→B,AB C,BC→DE,AC →E, DE→F} and G={A→BC,B→CDE,CE,D→BCE,E→ D}. (1) [5 points] Determine if the two sets F and G are equivalent or not. Explain your answer in detail. (2) [5 points] Determine if AB is a candidate key of R with respect to F. (b) [6 points] Consider the relation schema R(A,B,C,D,E) with the functional dependencies F = {A →→ C,B→D,BD → E, C →E}. Which of the following sets of attributes functionally determine CD? Show each step. • BC • BD • AE (c) [6 points] Consider the relation schema R(A,B,C,D) with the functional dependencies F = {AB → C,CD,BC}. We state that the FD C → B cannot be logically implied by the given F. (1) [3 points] Prove why C → B cannot be logically implied. (2) [3 points] Provide an example for your answer. (For the example, you can provide a table that has tuples with some values in it.) (d) [6 points] Let R(A,B,C,D,E,F) be a relation schema, and let F = {AB→D, CE→F,AC→DE,BD→ CF} be a set of functional dependencies (FDs). Which of the following attribute sets is a candidate key? • BD • AC • AB (e) [4 points] Consider the relation schema R(A,B,C,D,E,F) with the functional dependencies F = {A → B, CD →E,B→D,CA}. By using the algorithm for calculating attribute closures provided in the lecture slides, calculate the closure of the following attribute set. Show each step. • CE (f) [5 points] Let R(A,B,C) be a relation schema, and let F = {A → B} be a set of functional dependencies (FDs). Write down all the functional dependencies of the closure F+ of F and count them. Use the exponential algorithm from the lecture for calculating the closure of functional dependencies.  Fig: 1