70 likes | 79 Views
This article explains the BCNF Decomposition Algorithm, covering closure of attributes, missing information, and inference rules for functional dependencies and multivalued dependencies.
E N D
Closure of Attributes X Start with X+ = X Repeat until no change in X+ If there is Y -> Z with Y X+, then Add Z to X+
BCNF Decomposition Algorithm For any R in the schema If (X -> Y holds on R AND X -> Y is non-trivial AND X does not contain a key), then 1) Compute X+ (X+: closure of X) 2) Decompose R into R1(X+) and R2(X, Z) // X becomes common attributes // Z: all attributes in R except X+ Repeat until no more decomposition
Class(cnum, ta, sid) Class 143 TA: Tony, James Students: 100, 101, 103 Class 248 TA: Tony, Susan Students: 100, 102
Inference rules for FDs and MVDs • Reflexivity: If Y X, then X -> Y • Augmentation: If X -> Y, then ZX -> ZY • Transitivity: If X -> Y and Y -> X, then X -> Z • Complementation: If X ->> Y, then X ->> R – (YX) • MVD augmentation: If X ->> Y and W Z, then ZX ->> WY • MVD transitivity: If X ->> Y and Y ->> Z, then X ->> Z – Y • Replication: If X -> Y, then X ->> Y • Coalescence: If X ->> Y, W -> Y (Z Y, WY=), then X -> Z The set of above rules are sound and complete
4NF Decomposition Algorithm For any R in the schema If (non-trivial X ->> Y holds on R AND X does not contain a key), then Decompose R into R1(X,Y) and R2(X,Z) // X becomes common attributes // Z: all attributes in R except (X, Y) Repeat until no more decomposition