Given:
Relation → R(P,Q,S,T,X,Y,Z,W)
FDs → PQ→X;P→YX;Q→Y;Y→ZW
Firstly find candidate key for relation using closure method.
Since P,Q,S and T can’t derive from given dependencies. So they must be necessarily on the Determinant side.
Lets check for sufficient condition:
(PQST)ᐩ = {P,Q,S,T,Y,Z,W} means PQST is candidate key in R.
Main condition for lossless join of two Relations X and Y → there must be some Z = X∩Y such that Z is a CK either in X or Y.
Given: Decompositions →
D1:R=[(P,QS,T);(P,T,X);(Q,Y);(Y,Z,W)]
R1(PQST) is CK of given R.
R2(PTX) has FD : {P->X} so PT is CK.
R3(QY) has FD: {Q → Y} so Q is CK
R4(YZW) has FD : {Y→ ZW} so Y is CK.
R1 and R2 can be join without loss since R1∩R2=(PT) which is a CK in R2.
Now we have R5(PQSTX) with CK={PQST}.
R3 and R4 can be joined without loss since R3∩R4=(Y) which is CK in R4.
Now we have R6(QYZW) with CK={Q}
R5∩R6 = {Q} which is a CK in R6 So R5 and R6 can joined into R without any loss.
So D1 is LOSSLESS.
D2:R=[(P,Q,S);(T,X);(Q,Y);(Y,Z,W)]
R1(PQS) satisfy no FD.
R2(TX) satisfy no FD.
R3(QY) has FD: {Q → Y} so Q is CK
R4(YZW) has FD : {Y→ ZW} so Y is CK.
We can clearly see that R2 has no common attribute with any other relations, hereonly we can say that decomposition is lossless.
Since R1∩R2=Ø so can’t combine without loss.
R3 and R4 can be joined without loss since R3∩R4=(Y) which is CK in R4.
Now we have R5(QYZW) with CK={Q}
Since R1∩R5={Q} which is CK in R5 so can combine R1 and R5.
Now we new relation R6(PQSYZW).
Still R2∩R6=Ø so can’t combine without loss.
So D2 is LOSSY.
The correct Answer is A. D1 is a lossless decomposition, but D2 is a lossy decomposition.