EQUIVALENCE OF FUNCTIONAL DEPENDENCYDefinition: Two or more than two sets of functional dependencies are called equivalence if the righthand side of one set of functional dependency can be determined using the second FD set, similarly the righthand side of the second FD set can be determined using the first FD set. Q 1: Given a relational schema R( X, Y, Z, W, V ) set of functional dependencies P and Q such that:P = { X → Y, XY → Z, W → XZ, W → V} and Q = { X → YZ, W → XV } using FD sets P and Q which of the following options are correct?
→Using definition of equivalence of FD set, let us determine the righthand side of the FD set of P using FD set Q. Given P = { X → Y, XY → Z, W → XZ, W → V} and Q = { X → YZ, W → XV } Let's find closure of the left side of each FD of P using FD Q.
Now compare closure of each X, XY, W and W calculated using FD Q with the righthand side of FD P. Closure of each X, XY, W and W has all the attributes which are on the righthand side of each FD of P. Hence, we can say P is a subset of Q1 →Using definition of equivalence of FD set, let us determine the righthand side of the FD set of Q using FD set P. Given P = { X → Y, XY → Z, W → XZ, W → V} and Q = { X → YZ, W → XV } Let us find closure of the left side of each FD of Q using FD P.
Now compare closure of each X, W calculated using FD P with the righthand side of FD Q. Closure of each X and W has all the attributes which are on the righthand side of each FD of Q. Hence, we can say Q is a subset of P2 From 1 and 2 we can say that P = Q, hence option C is correct. Q 2: Given a relational schema R( A, B, C, D ) set of functional dependencies P and Q such that:P = { A → B, B → C, C → D } and Q = { A → BC, C → D } using FD sets P and Q which of the following options are correct?
→Using definition of equivalence of FD set, let us determine the righthand side of the FD set of P using FD set Q. Given P = { A → B, B → C, C → D } and Q = { A → BC, C → D } Let us find closure of the left side of each FD of P using FD Q.
Now compare closure of each A, B and C calculated using FD Q with the righthand side of FD P. Closure B is B while in FD set P, B → C (B determines C), since the closure of B determined using FD Q has no C. Hence, we can say P is not a subset of Q1 →Using definition of equivalence of FD set, let us determine the righthand side of the FD set of Q using FD set P. Given P = { A → B, B → C, C → D } and Q = { A → BC, C → D } Let us find closure of the left side of each FD of Q using FD P.
Now compare closure of each A and C calculated using FD P with the righthand side of FD Q. Closure of each A and C has all the attributes which are on the righthand side of each FD of Q. Hence, we can say Q is a subset of P2 From 1 and 2 we can say that only Q is a subset of P since from 1 condition violated, hence option B is correct. Q 3: Given a relational schema R( X, Y, Z ) set of functional dependencies P and Q such that:P = { X → Y, Y → Z, Z → X } and Q = { X → YZ, Y → X, Z → X } using FD sets P and Q which of the following options are correct?
→Using definition of equivalence of FD set, let us determine the righthand side of the FD set of P using FD set Q. Given P = {X → Y, Y → Z, Z → X} and Q = {X → YZ, Y → X, Z → X} Let us find closure of the left side of each FD of P using FD Q.
Now compare closure of each X, Y, Z calculated using FD Q with the righthand side of FD P. Closure of each X, Y, Z has all the attributes which are on the righthand side of each FD of P. Hence, we can say P is a subset of Q1 →Using definition of equivalence of FD set, let us determine the righthand side of the FD set of Q using FD set P. Given P = { X → Y, Y → Z, Z → X } and Q = { X → YZ, Y → X, Z → X } Let us find closure of the left side of each FD of Q using FD P.
Now compare closure of each X, Y and Z calculated using FD P with the righthand side of FD Q. Closure of each X, Y and Z has all the attributes which are on the righthand side of each FD of Q. Hence, we can say Q is a subset of P2 From 1 and 2 we can say that P = Q, hence option C is correct. Conclusion: From the above three questions solved for equivalence of FD, we noticed the following steps which are as follows: STEP 1: Suppose two FD sets P and Q are given, write FD of each set P and Q separately. STEP 2: Take FD set P first and then find closure of each attribute of the left side of FD in P using FD set Q. STEP 3: Now compare the closure of each attribute of P with the righthand side of FD of P. STEP 4: If closure of each attribute is equal to the righthand side of FD of P, we say P is a subset of Q STEP 5: Take FD set Q next and then find closure of each attribute of the left side of FD in Q using FD set P. STEP 6: Now compare the closure of each attribute of Q with the righthand side of FD of Q. STEP 7: If closure of each attribute is equal to righthand side of FD of Q, we say Q is a subset of P STEP 8: IF P is a subset of Q and Q is a subset of P, we can say P = Q.
Next TopicReferential Integrity constraint
