Normalization of Database Tables
Normalization of Database Tables
Normalization of Database Tables
Project Num :
15
Project Name : Evergreen
102
103
105
Table Structure Matches
the Report Format
Database Tables and
Normalization
After
Before
First Normal Form (1 NF)
1NF Definition
– The term first normal form (1NF) describes
the tabular format in which:
All the key attributes are defined.
There are no repeating groups in the table.
All attributes are dependent on the primary
key.
Dependency Diagram
Dependency Diagram
– The primary key components are bold, underlined, and
shaded in a different color.
– The arrows above entities indicate all desirable
dependencies, i.e., dependencies that are based on PK.
– The arrows below the dependency diagram indicate less
desirable dependencies -- partial dependencies and
transitive dependencies.
Second Normal Form (2 NF)
3NF Definition
– A table is in 3NF if:
It is in 2NF and
It contains no transitive dependencies.
The
Completed
Database
Boyce-Codd Normal Form
(BCNF)
– A table is in Boyce-Codd normal form (BCNF) if
every determinant in the table is a candidate
key.
(A determinant is any attribute whose value
determines other values with a row.)
– If a table contains only one candidate key, the
3NF and the BCNF are equivalent.
– BCNF is a special case of 3NF.
– Figure 5.7 illustrates a table that is in 3NF but
not in BCNF.
– Figure 5.8 shows how the table can be
decomposed to conform to the BCNF form.
A Table That Is In 3NF
But Not In BCNF
The Decomposition of a Table Structure
to Meet BCNF Requirements
Sample Data for a BCNF Conversion
Decomposition into BCNF
BCNF Definition
BCNF Definition
– A table is in BCNF if every determinant in that
table is a candidate key. If a table contains
only one candidate key, 3NF and BCNF are
equivalent.
Normalization
4NF Definition
– A table is in 4NF if it is in 3NF and has no
multiple sets of multivalued dependencies.
A Set of Tables in 4NF
Denormalization