Q66.Marks: +2.0UGC NET Paper 2: Computer Science17th June 2023
let R (A, B, C, D) be a relational schema with following function dependencies:
A → B, B → C
C → D and D → B
The decomposition of R into
(A, B) (B, C) (B, D)
1.gives a lossless join, and is dependency preserving
2.gives lossless join, but is not dependency preserving ✓ Correct
3.does not give a lossless join, but is dependency preserving
4.does not give a lossless join and is not dependency preserving
Solution
The correct answer is: option 2) gives lossless join, but is not dependency preserving
Key Points
Given:
Relation: R(A, B, C, D)
Functional Dependencies:
A → B
B → C
C → D
D → B
Decomposition: R1(A, B), R2(B, C), R3(B, D)
Step 1: Candidate Key Identification
From A → B, and B → C, we get A → C
From A → C, and C → D, we get A → D
Therefore, A → B, C, D implies A is a candidate key
Step 2: Check for Lossless Join
The common attribute B is present in all three relations.
And we know that A → B, and A is a candidate key.
Therefore, the decomposition gives a lossless join as per the lossless join property using functional dependency and shared attributes.
Step 3: Check for Dependency Preservation
Functional Dependency
Preserved?
Reason
A → B
✅ Yes
Present in R1 (A, B)
B → C
✅ Yes
Present in R2 (B, C)
C → D
❌ No
C is in R2, D is in R3 – not in a single relation
D → B
✅ Yes
Present in R3 (B, D)
Since C → D is not preserved in any of the decomposed relations, the decomposition is not dependency preserving.
Additional Information
Lossless Join: Ensures that joining the decomposed relations yields the original relation without any spurious tuples.
Dependency Preservation: Ensures that all functional dependencies are maintained in the decomposed schema without needing to perform joins to validate them.
To preserve all dependencies, especially C → D, the decomposition should include a relation like R3(C, D) instead of R3(B, D).
Hence, the correct answer is:option 2) gives lossless join, but is not dependency preserving