Normalisation Flashcards
What is normalisation?
Formal technique for analysing a relation based on its primary key and the functional dependencies between the attributes of that relation.
What is lossless decomposition?
A decomposition is lossless if R1 union R2 -> (R1 || R2). AKA a join would provide the original relation
When is a relation in 1NF?
Domains of all attributes in R are atomic, AKA indivisible units.
When is a relation in 2NF?
Every non-prime attribute is fully functionally dependent on a candidate key (AKA candidate key identifies all attributes) and is in 1NF.
How do we go from 1NF to 2NF?
Identify partial dependencies that exist on the primary key and remove them by placing them in a new relation
When is a relation schema in 3NF?
When a non-trivial functional dependency X -> Y in R, at least one is true:
1. X is a superkey of R
2. Each attribute z in y-x is in candidate key of R.
AKA no transitive dependencies.
When is a relational schema in BCNF?
When a non-trivial functional dependency X -> Y in R, X is a superkey of R