Академический Документы
Профессиональный Документы
Культура Документы
Normal Forms
Chapter 19
What is normalization?
In general, normalization removes
duplication and minimizes redundant chunks
of data.
The result is better organization and more
effective use of physical space, among other
factors.
Normalization is not always the best solution!
Table in 0th
Normal Form!
Partial Dependency
Case 1: Attribute A
Key Attributes X
A not in Key
Is this in 2NF??
Is this in 2NF??
✔
Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke 31
3NF: Third Normal Form
Transitive Dependency
Case 1:
Key Attributes X Attribute A
A not in Key
Case 2: Attributes X
Key Attribute A
A is in Key
a transitive dependency
exists because it is
assumed that:
1. each employee is
assigned to a CAUTION: too many
particular department tables will result to slower
2. each department within queries having to join too
a company is exclusively many tables
based in one specific city
Is this in 2NF??
Is this in 2NF??
✔
all the nonkey attributes (B and C) are fully dependent on the
primary key (A)
Is this in 3NF??
Is this in 3NF??
✕
C, which is a nonkey attribute, is also functionally dependent on
B, which is also a nonkey attribute. Therefore, the relation R is
not in 3NF.
✕
✔
Is this in 2NF??
Is this in 2NF??
✕
The R relation is not in 2NF because, like before, C is in a partial
dependence with the primary key.
✕
?
✕
✕
We can’t because we lose an FD, namely D → C. Therefore, we
need to find another decomposition.
✕
?
✕
✔
With this decomposition, no FDs are lost. And the resulting
relations are in 2NF.
✕
?
✕
✔
The resulting relations are not only in 2NF, but they are also in
3NF.
✕
B and D are determinants and are not candidate keys. Therefore,
the relation R2 is not in BCNF, while the relation R1 is.
✕ ✔
Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke 59
BCNF: Boyce-Codd Normal Form
Normalized Form!
✔
Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke 60
Recap!
Decomposition of CSJDPQV