Consider a schema R(ABCDEFGHIJK) with the following functional dependencies: F…
Consider a schema R(ABCDEFGHIJK) with the following functional dependencies:
F = {AB -> C, A -> DE, B -> F, F -> GH, D -> IJK}
The decomposition of R into R1(ABCD), R2(DE), R3(BFGH), and R4(DIJK) is:
Answer: C. Lossy join and dependency not preserving. — Given: R = {A, B, C, D, E, F, G, H, I, J, K} F = {AB -> C, A -> DE, B -> F, F -> GH, D -> IJK} Decomposition: R1(A, B, C, D), R2(D, E), R3(B, F, G, H), R4(D,…
- A.
Lossless join & dependency preserving.
- B.
Lossless join & dependency not preserving.
- C.
Lossy join and dependency not preserving.
- D.
Lossy join and dependency preserving.
Attempted by 28 students.
Show answer & explanation
Correct answer: C
Given:
R = {A, B, C, D, E, F, G, H, I, J, K}
F = {AB -> C, A -> DE, B -> F, F -> GH, D -> IJK}
Decomposition:
R1(A, B, C, D), R2(D, E), R3(B, F, G, H), R4(D, I, J, K)
1. Dependency preservation
Check the original dependencies:
AB -> C is preserved in R1.
A -> D is preserved in R1, but A -> E is not preserved because no decomposed relation contains both A and E, and the projected dependencies do not imply D -> E or A -> E.
B -> F is preserved in R3.
F -> GH is preserved in R3.
D -> IJK is preserved in R4.
Since A -> E from A -> DE is lost, the decomposition is not dependency preserving.
2. Lossless join
The earlier reasoning that the decomposition is lossless just because R1 contains the key AB is not valid for this multiway decomposition.
Consider R2(DE). It joins back with the rest of the decomposition only through the common attribute D. For this join to be guaranteed lossless at that step, D should determine E (or determine the attributes of one side). But from the given FDs, D -> E does not hold.
A counterexample is possible with two valid tuples having the same D but different E values, such as one tuple with (A = a1, D = d, E = e1) and another with (A = a2, D = d, E = e2). This does not violate the given FDs as long as D gives the same IJK. After decomposition, R1 can join with the wrong R2 row on D and create a spurious tuple, for example combining A = a1 with E = e2.
Therefore, the decomposition is lossy.
Final answer: Lossy join and dependency not preserving.