Objectives
Normalization process First normal form (1NF) Second normal form (2NF) Third normal form (3NF)
Data Redundancy
Data redundancy refers to having the same
data in different places within a database
Database Normalization
Normalization Process
Progressively breaks a table into a new set of
tables (relations) based on identified dependencies
Each table represents a single subject No data item will be unnecessarily stored in more
than one table
anomalies
5
Conversion to 1NF:
Eliminate repeating groups Identify PK Identify dependencies
Oracle 11g: SQL
Move dependent attributes to the new tables Create a bridge between the two tables with the
original composite PK and attributes that dependent on it 10 Oracle 11g: SQL
11
12
13
Conversion to 3NF:
For each transitive dependency, use the
determinant as PK in a new table but keep it within the original table Move dependent attributes to the new table
Oracle 11g: SQL
14
15
Dependency Diagram
To show the primary key and all the dependencies, you
can use a dependency diagram Dependencies between PK and other attributes are depicted
above the diagram Partial or transitive dependencies are depicted below the diagram and identified (for instance, PD, TD)
16
PUBLISHER, CONTACT
None of these attributes is a good choice for PK:
Add a new attribute PUB_ID and use it as PK Re-visit the BOOKS table and change the name of the foreign key column
(PUBLISHER) to PUB_ID to be consistent with the PUBLISHER table
Summary
Normalization is the process for evaluating and
correcting table structures to reduce data redundancies
1NF:
Eliminate repeating groups Identify the primary key
2NF:
Table is in 1NF Partial dependencies are eliminated
3NF:
Table is in 2NF Transitive dependencies are eliminated
Oracle 11g: SQL
20