Dependency Preservation
What is Dependency Preservation?
Dependency Preservation refers to the ability to maintain all functional dependencies of the original relation after decomposition during normalization. It ensures that no essential data relationships are lost when a large table is broken into smaller ones to remove redundancy and anomalies.
Â
When a relation is decomposed into multiple relations to satisfy higher normal forms like 3NF or BCNF, dependency preservation checks whether all the original functional dependencies can still be enforced using the new set of relations, without needing to recombine them (i.e., without performing a join).
Why is Dependency Preservation Important?
Maintaining dependency preservation is crucial for two reasons:
Â
Data Integrity: Functional dependencies define rules about how data should relate. Losing them means we may no longer be able to enforce those rules, leading to inconsistencies.
Â
Ease of Constraint Enforcement: If the dependencies are preserved across the decomposed tables, each constraint can be enforced individually on each table, which is more efficient and simpler than checking across joins.
Example
Suppose R (A B C D) and set of functional dependencies
F: AB->CD, D-> A
If R is decomposed into following two relations
R1 (A D),
R2 ( B C D)
Identify that this decomposition is dependency preserving or not?
Â
Solution:
R (A B C D)
F: AB->CD, D-> A
It can be seen that while decomposing, the functional dependency AB->CD has been
lost.
To understand, calculate AB + = AB [ Using FD in F` ] while in F, AB can determine CD
but this dependency is lost in F`.
Therefore, this decomposition is not dependency preserving decomposition
Dependency Preservation vs Lossless Decomposition
It’s important to understand that dependency preservation is not the same as lossless decomposition.
Â
Lossless Decomposition ensures that when we decompose a relation, we can reconstruct the original relation perfectly through joins, without losing any data.
Â
Dependency Preservation ensures that we can still enforce all the original functional dependencies in the new schema without needing to join tables.
Â
A good decomposition should satisfy both properties.
Summary
Dependency Preservation ensures that all functional dependencies are still enforceable after decomposition.
Â
It is essential for maintaining integrity and avoiding expensive join operations for constraint checking.
Â
A well-normalized database must ideally have lossless decomposition with dependency preservation, especially when dealing with practical systems that need efficiency and consistency.