Normalization Flashcards
Important properties of well designed relational schema
1) Relations consist of attributes that are logically related
2) Lossless-join property: Ensures that information decomposed across many relations can be reconstructed using natural joins
3) Dependencies preservation property - Ensures that constraints on the original relation can be maintained by enforcing constraints on normalized relations
Functional dependency
X -> Y
X functionally determines Y
Y is functionally dependent on X
Algorithm for attribute closure
Given a set of attributes X
Let X^+ = X
Repeat
- Find a FD in F whose left side is a subset of X^+
- Add the right side of F to X^+
Until (X^+ does not change)
!NF
First normal form: All attribute values are atomic
2NF
All non-key attributes full FD on a candidate key
3NF
All attributes are FD by a candidate key or are a part of a candidate key
BCNF
All attributes are only FD by a candidate key
4NF
No multi-value dependencies exists
5NF
No join dependencies exist
Algorithm for cinverting to BCNF
Look among the given FDs for a BCNF violation X -> Y
Compute X^+
Replace R by relations with schemas
Project the FDs onto the two new relations