Question 173 MCQ · 3.0 marks
The decomposition is lossless and dependency preserving
The decomposition is lossy and dependency preserving
The decomposition is lossless but not dependency preserving
The decomposition is lossy and not dependency preserving
Published solution
We are given the relation \( R = (A, B, C, D) \) with functional dependencies \( \mathcal{F} = \{A \rightarrow B, \; B \rightarrow C, \; C \rightarrow D\} \), decomposed into:
- \( R_1 = \{A, B\} \)
- \( R_2 = \{A, C, D\} \)
**1. Check Lossless Join Property:**
- Common attribute: \( R_1 \cap R_2 = \{A\} \).
- Attribute closure of \( \{A\} \): Since \( A \rightarrow B \rightarrow C \rightarrow D \), we have \( \{A\}^+ = \{A, B, C, D\} \), so \( A \) is a superkey of both \( R_1 \) and \( R_2 \)!
- Therefore, the decomposition is **lossless**.
**2. Check Dependency Preservation:**
- Projected FDs on \( R_1(A, B) \): \( \mathcal{F}_1 = \{A \rightarrow B\} \).
- Projected FDs on \( R_2(A, C, D) \): \( \mathcal{F}_2 = \{A \rightarrow C, \; A \rightarrow D, \; C \rightarrow D\} \).
- Can we derive \( B \rightarrow C \) from \( \mathcal{F}_1 \cup \mathcal{F}_2 \)?
Compute the closure of \( B \) under \( \mathcal{F}_1 \cup \mathcal{F}_2 \): Since no FD in \( \mathcal{F}_1 \cup \mathcal{F}_2 \) has \( B \) on the LHS, \( \{B\}^+ = \{B\} \), which does not contain \( C \)!
- Thus, \( B \rightarrow C \) is **not preserved**, so the decomposition is **not dependency preserving**.
**Answer: The decomposition is lossless but not dependency preserving.**
A: **Incorrect:** The dependency `B -> C` spans across `R1` and `R2` and cannot be recovered from the projected FDs.
B: **Incorrect:** The decomposition is lossless (since `R1 ∩ R2 = {A}` is a key) and not dependency preserving.
C: **Correct:** `R1 ∩ R2 = {A}` determines `R1` and `R2` (lossless), but `B -> C` is lost (not dependency preserving).
D: **Incorrect:** Because `A` is the key of `R`, intersecting at `{A}` guarantees a lossless join.