Skip to content
Official PYQ · 2021

GATE CS 2021 Set 1 Q33 — Normal Forms

Explain with AI

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:\quad 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:\quad R=[(P,Q,S);\;(T,X);\;(Q,Y);\;(Y,Z,W)]

Which one of the following options is correct?

Choose one option
View worked solution

Answer: A

To determine whether the decompositions D1D_1 and D2D_2 are lossless or lossy, we analyze their join properties using the given functional dependencies (FDs):

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

1. Analysis of 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)\}:

  • Join R3(Q,Y)R_3(Q,Y) and R4(Y,Z,W)R_4(Y,Z,W): Their intersection is R3∩R4={Y}R_3 \cap R_4 = \{Y\}. Since Y→ZWY \rightarrow ZW, YY is a superkey for R4R_4. Thus, this join is lossless, yielding R34(Q,Y,Z,W)R_{34}(Q,Y,Z,W).
  • Join R1(P,Q,S,T)R_1(P,Q,S,T) and R34(Q,Y,Z,W)R_{34}(Q,Y,Z,W): Their intersection is R1∩R34={Q}R_1 \cap R_{34} = \{Q\}. Since Q→YQ \rightarrow Y and Y→ZWY \rightarrow ZW, we have Q→YZWQ \rightarrow YZW. Thus, QQ is a superkey for R34R_{34}, making this join lossless, yielding R134(P,Q,S,T,Y,Z,W)R_{134}(P,Q,S,T,Y,Z,W).
  • Join R2(P,T,X)R_2(P,T,X) and R134(P,Q,S,T,Y,Z,W)R_{134}(P,Q,S,T,Y,Z,W): Their intersection is R2∩R134={P,T}R_2 \cap R_{134} = \{P, T\}. Since P→YX  ⟹  P→XP \rightarrow YX \implies P \rightarrow X, the attribute set {P,T}\{P, T\} functionally determines XX. Thus, {P,T}\{P, T\} is a superkey for R2R_2, making this final join lossless.

Therefore, D1D_1 is a lossless decomposition.

2. Analysis of 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)\}:

  • Consider the relation R2(T,X)R_2(T,X). The set of attributes in all other relations is R1∪R3∪R4={P,Q,S,Y,Z,W}R_1 \cup R_3 \cup R_4 = \{P, Q, S, Y, Z, W\}.
  • The intersection is R2∩(R1∪R3∪R4)={T,X}∩{P,Q,S,Y,Z,W}=∅R_2 \cap (R_1 \cup R_3 \cup R_4) = \{T, X\} \cap \{P, Q, S, Y, Z, W\} = \emptyset.
  • Since the intersection is empty, R2R_2 cannot be joined losslessly with any other relation.

Therefore, D2D_2 is a lossy decomposition.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Normal Forms questions