Question

Consider the relation R(P,Q,S,T,X,Y,Z,W)R(P, Q, S, T, X, Y, Z, W) with the following functional dependencies.

PQ→X;P→YX;Q→Y;Y→ZWPQ \rightarrow X; \quad P \rightarrow YX; \quad Q \rightarrow Y; \quad Y \rightarrow ZW

Consider the decomposition of the relation RR into the constituent relations according to the following two decomposition schemes.

D1:R=[(P,Q,S,T);(P,T,X);(Q,Y);(Y,Z,W)]D_1: R = [(P, Q, S, T); (P, T, X); (Q, Y); (Y, Z, W)]
D2:R=[(P,Q,S);(T,X);(Q,Y);(Y,Z,W)]D_2: R = [(P, Q, S); (T, X); (Q, Y); (Y, Z, W)]

Which one of the following options is correct?

Choose one option
Official answer and solution
Official answer
A
From
Official GATE 2021 answer key

Solution

Test whether each constituent relation can be losslessly combined using functional dependencies to determine common attribute keys.

Given schema R(P,Q,S,T,X,Y,Z,W)R(P, Q, S, T, X, Y, Z, W) with FDs:

PQ→X,P→YX,Q→Y,Y→ZWPQ \rightarrow X, \quad P \rightarrow YX, \quad Q \rightarrow Y, \quad Y \rightarrow ZW

For decomposition D1={R1(P,Q,S,T),R2(P,T,X),R3(Q,Y),R4(Y,Z,W)}D_1 = \{R_1(P, Q, S, T), R_2(P, T, X), R_3(Q, Y), R_4(Y, Z, W)\}:

  1. Consider R3(Q,Y)R_3(Q, Y) and R4(Y,Z,W)R_4(Y, Z, W): R3∩R4=YR_3 \cap R_4 = Y. The FD Y→ZWY \rightarrow ZW means YY is a key of R4R_4. Merging them gives R34(Q,Y,Z,W)R_{34}(Q, Y, Z, W) losslessly.
  2. Consider R1(P,Q,S,T)R_1(P, Q, S, T) and R2(P,T,X)R_2(P, T, X): R1∩R2=PTR_1 \cap R_2 = PT. Since P→YXP \rightarrow YX, we have P→XP \rightarrow X, so PT→XPT \rightarrow X. Hence PTPT is a key of R2R_2. Merging them gives R12(P,Q,S,T,X)R_{12}(P, Q, S, T, X) losslessly.
  3. Consider R12R_{12} and R34R_{34}: R12∩R34=QR_{12} \cap R_{34} = Q. Since Q→YQ \rightarrow Y and Y→ZWY \rightarrow ZW, Q+=QYZWQ^+ = QYZW. Thus QQ is a key of R34R_{34}. Merging them produces RR losslessly.
    Therefore, D1D_1 is a lossless decomposition.

For decomposition D2={R1(P,Q,S),R2(T,X),R3(Q,Y),R4(Y,Z,W)}D_2 = \{R_1(P, Q, S), R_2(T, X), R_3(Q, Y), R_4(Y, Z, W)\}:
In D2D_2, attribute TT appears only in R2(T,X)R_2(T, X). None of the given FDs have TT on the right side, so TT cannot be derived from any attributes outside R2R_2. Furthermore, the intersection of R2R_2 with (R1∪R3∪R4)(R_1 \cup R_3 \cup R_4) contains only XX, but XX does not functionally determine TT or any other attribute. Hence R2R_2 cannot be losslessly rejoined. Thus D2D_2 is lossy.

Therefore, D1D_1 is lossless, but D2D_2 is lossy (option A).

Final answer

A

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2021 Computer Science and Information Technology (CS, Set-1)
Question
43 of 65, printed as CS Q.33
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.