Lecture 2 - Normalisation Basics Flashcards
What is another name for normalization?
progressive decomposition
- of unsatisfactory (bad) relations by breaking
up their attributes into smaller good relations
What is the degree of normalization?
The normal form i.e. how far relations have been decomposed
What degrees of normalization do we need to know about?
1NF
2NF
3NF
BCNF
What is the goal of normalization?
Optimal relations, so that when they’re rejoined we do not have fictions tuples and no redundancy. The guidelines are followed throughout the process!
What is a prime attribute?
attribute that belong to some candidate key of a relation
What is a non-prime attribute?
attribute that is not a member of any candidate key.
What is 1NF?
First Normal Form
This form disallows nested attributes and multi valued attributes. i.e. attributes are atomic
What do we expect from relations in 1NF?
Redundancy and repeated values
What is 2NF?
Second normal form
A relation R is in 2NF if every non-prime attribute A in R is
fully functionally dependent on the primary key of R
How do we go from 1NF to 3NF?
remove all prime attributes from the primary
key, which cause partial dependencies
What does : verbosity in PK mean?
removing any attribute in PK can’t identify the instance uniquely anymore
What is 3NF?
Third Normal Form
A relation R is in 3NF (being already in 2NF) if there is no non-
prime attribute which is transitively dependent on the primary key. This means all non-prime attributes should be directly determined from the PK
How to go from 2NF to 3NF?
Split the original relation into two relations: the non-prime transitive attribute. (the one that joins prime and other non-prime).
transitive attribute becomes PK in new relation and FK in the original relation
What is tricky with 3NF?
That the transitive attribute can be a candidate key / prime attribute, which would then mean the transitive functional dependency is ok.
What is generalized 3nF?
Every non-prime attribute A in relation R:
- is fully functionally dependent on every candidate key in R.
- is non-transitively dependent on every candidate key in R