COMP2714 Tutorial-4-2-Normalization
COMP2714 Tutorial-4-2-Normalization
2: Normalisation – Solutions
Introduction
Purpose: The purpose of this tutorial is to provide you with experience in normalising to
both BCNF and 3NF. You will also become familiar with the process of computing
minimal cover and how this can be used to complete a 3NF decomposition via
synthesis.
Learning Outcomes: By the end of this tutorial you will be able to:
• Decompose a relation into BCNF using the top-down approach
• Compute the minimal cover of a relation given a set of functional
dependencies
• Decompose a relation into 3NF using the bottom-up approach
Final answer:
R1 [A, C] {A} → {C}
R2 [A, B, D, E] {A, B} → {D, E}
A.2 R [A, B, C, D, E]
{A} à {B}
{C} à {D, E}
Final answer:
R1[A, B] {A} → {B}
R3[C, D, E] {C} → {D, E}
R4[A, C] No non-trivial FD
A.3 R [A, B, C, D, E, F]
{A} à {B, C}
{C} à {D, E}
{E} à {F}
Final answer:
R1[C, D, E] {C} → {D, E}
R3[C, F] {C} → {F} [Implicit FD]
R4[A, B, C] {A} → {B, C}
A.4 R [A, B, C, D, E]
{A} → {B}
Final answer:
R1[A, B] {A} → {B}
R3[C, D, E] {C} → {D, E}
R4[A, C] No non-trivial FD
Notice that this is the same solution as A.2, think why this is the case despite
A.4 having double the number of initials FDs. What is lost?
Synthesis:
R1 - R4 are in 3NF
Synthesis:
R1[A, B, C] {A, B} à C
R2[C, D, E] C à {D, E}
R3[A, B, F] No non-trivial FD
Synthesis:
R1 - R3 are in 3NF
Synthesis:
R1 - R4 are in 3NF