Advanced Normalisation
Advanced Normalisation
Advanced Normalisation…
1
CET341 Advanced Normalisation
Contents
• Test of knowledge
• Re-cap and problems of 3NF
• Boyce-Codd Normal Form
• Fourth Normal Form
• Fifth Normal Form
• Summary
2
CET341 Advanced Normalisation
1NF
Cracked case
3
CET341 Advanced Normalisation
2NF
4
CET341 Advanced Normalisation
3NF
5
CET341 Advanced Normalisation
Candidate Keys
• A relation may have more than one potential
primary key
• These are known as candidate keys:
– an attribute (or set of attributes) which are potential
primary keys NI no Student No Name
AB 12 34 56 A 01123456S Fred
CD 23 45 67 B 01145678S Jane
AD 34 68 12 G 01198765S Sarah
BD 98 54 32 E 01176542S Fred
– In this example both NI no and Student no are suitable
choices for primary key
7
CET341 Advanced Normalisation
Slide 8
CET341 Advanced Normalisation
Slide 9
CET341 Advanced Normalisation
BCNF Example
Slide 10
CET341 Advanced Normalisation
BCNF Example
11
CET341 Advanced Normalisation
Slide 12
CET341 Advanced Normalisation
Slide 13
CET341 Advanced Normalisation
Slide 14
CET341 Advanced Normalisation
Slide 16
CET341 Advanced Normalisation
R1 R2 R3
Prop Item Item Supplier Prop Supplier
P10 Washer Washer S1 P10 S1
P10 Microwave Microwave S2 P10 S2
P20 Washer Washer S2 P20 S2
Slide 17
CET341 Advanced Normalisation
Slide 18
CET341 Advanced Normalisation
5NF cont
• We join on the common attributes, which in this case is
Prop and Supplier
Prop Supplier
P10 S1
P10 S2
P20 S2
• And we find that the extra row will disappear from the result, giving
us the original result, i.e. a lossless decomposition
• i.e. all three tables must exist and be joined to be in 5NF
19
CET341 Advanced Normalisation
Slide 20
CET341 Advanced Normalisation
• 6NF
– Defined to deal with temporal data
• Optimal Normal Form (ONF)
– Copes with relationships which can be expressed using Object
• And now there’s even a new book…
21
CET341 Advanced Normalisation
Summary
• 3NF not always adequate in relational design
– So further normalisation levels: BCNF, 4NF and 5NF
– There are other levels, e.g. Domain Key Normal Form
(DKNF)
Slide 22
CET341 Advanced Normalisation
Further Reading
Slide 23