5.4Dependency preservation
The idea
A decomposition preserves dependencies if every FD can be checked inside one part, without joining.
Think of it like this: Rules that can be enforced inside each department, without calling another one.
Why it exists
It is independent of lossless join, and GATE tests both.
How it works
- For each FD X → Y start with Z = X.
- For each part Ri: Z = Z ∪ (closure(Z ∩ Ri) ∩ Ri). Repeat until Z stops growing.
- The FD is preserved if Y ⊆ Z.
- The decomposition preserves dependencies if every FD is preserved.
Worked example: R(A, B, C, D), F = {A → B, B → C, C → D, D → A}, parts AB, BC, CD.
D → A is not inside any part, but through C → D, B → C, A → B the test reaches A: all preserved.
Now play with it
- →Load the "Not preserved" example in the tool.
- →Make a lossless decomposition that does not preserve dependencies.
| FD | Grow Z (start Z = left side) | Right side reached? |
|---|---|---|
| A → B | AB: A → AB ; BC: AB → ABC ; CD: ABC → ABCD → Z = ABCD | yes |
| B → C | AB: B → AB ; BC: AB → ABC ; CD: ABC → ABCD → Z = ABCD | yes |
| C → D | BC: C → BC ; CD: BC → BCD ; AB: BCD → ABCD → Z = ABCD | yes |
| D → A | CD: D → CD ; BC: CD → BCD ; AB: BCD → ABCD → Z = ABCD | yes |
Test (no need to project the FDs): start with Z = X, repeatedly set Z = Z ∪ (closure(Z ∩ Ri) ∩ Ri) for every Ri. The FD X → Y is preserved if Y ends up inside Z.
Check yourself
Which statement is true?
Exam notes (the dense version)
A decomposition preserves dependencies if every FD of F can be checked inside a single relation, i.e. the union of the projections of F onto the parts is equivalent to F. Test without projecting: for each X → Y, start with Z = X and repeat Z = Z ∪ (closure(Z ∩ Ri) ∩ Ri) for all Ri; the FD is preserved if Y ⊆ Z. Lossless and dependency preserving are independent: a decomposition can be one, both or neither.
Previous year questions: Normal Forms & Decomposition (11)
PYQs are grouped by topic, so this is the full set for Normal Forms & Decomposition; try the ones that match this subtopic. Open all 11 on the topic page.