Correct Answer - Option 4 : D
1 is a lossless decomposition, but D
2 is a lossy decomposition.
Answer: Option 4
Concept:
Lossless Decomposition:
for a Decomposition of two Relation, R1 and R2 to be lossless 2 condition needs to be satisfied that is
1. R1 ∩ R2 → R1 or R2 i.e. common attributes must be key to either of the relation.
2. attributes of R1 ∪ attributes of R2 ≡ attributes of R
Explanation:
D1 : R = [(P, Q, S, T); (P, T, X); (Q, Y); (Y, Z, W)]
lets first take 2 relations R1(P, Q, S, T ) R2(P, T, X)
common attributes are PT and PT → TX ( according to augmentation property )
so relation becomes R1(P, Q, S, T, X) R2(Q, Y)
The common attribute is Q and Q→ Y is key to R2 Hence (P, Q, S, T, X, Y)
So now relation becomes R1(P, Q, S, T, X, Y) R2(Y, Z, W)
The common attribute is Y and Y is key to R2.
Hence all attributes get combined into one relation and hence this Decomposition is lossless.
D2 : R = [(P, Q, S); (T, X); (Q, Y); (Y, Z, W)]
If you observe relation (T, X); Its attributes not common to any other relations.
even if we combined all other attributes R1(P, Q, S, Y, Z, W) R2(T, X)
still no common attributes Hence this decomposition is lossy.