Professional Documents
Culture Documents
Objectives
Module Overview
Normalization
Before Normalization Example
a. First Normal Form (1NF)
b. Second Normal Form (2NF)
c. Third Normal Form (3NF)
Completed Tables in Third Normal Form
Lesson 1: Normalization
Lesson 1: Normalization
Normalization avoids the following:
1. Duplication of Data the same data is listed
in multiple lines of the database
2. Insert Anomaly - a record about an entity
cannot be inserted into the table without first
inserting information about another entity
3. Delete Anomaly a record cannot be deleted
without deleting a record about a related entity
4. Update Anomaly cannot update information
w/o changing information in many places
Date
Custome
rNo
CustomerN
ame
Customer
Add
Clerk
No
ClerkNa
me
Item
No
Descript
ion
Qty
UnitPr
ice
ItemNo
Description
Qty
UnitPrice
The repeating fields will be removed from the original data table, leaving the
following.
SalesOrderNo
Date
CustomerNo
CustomerName
CustomerAdd
ClerkNo
ClerkName
ItemNo
Description
All of these fields except the primary key will be removed from the original table.
The primary key will be left in the original table to allow linking of data:
The new table is as follows
SalesOrderNo
ItemNo
Qty
UnitPrice
Never treat price as dependent on item. Price may be different for different
sales orders (discounts, special customers, etc.)
Along with the unchanged table below, these tables make up a database in
second normal form:
SalesOrderNo
Date
CustomerNo
CustomerName
CusstomerAdd
ClerkNo
ClerkName
CustomerNam
CustomerNO
e
CustomerAdd
ClerkNo
ClerkName
All of these fields except the primary key will be removed from the original table.
The primary key will be left in the original table to allow linking of data as follows:
SalesOrderN
o
Date
CustomerN
o
ClerkNo
Together with the unchanged tables below, these tables make up the
database in third normal form.
ItemNo
Description
SalesOrderNo ItemNo
Qty
UnitPrice
customers
CustomerNo
Clerks
CustomerName
ClerkNo
Inventory items
Sales order
Sales order
details
SalesOrderNo
SalesOrderNo
CustomerAdd
ClerkName
ItemNo
Date
ItemNo
Description
CustomerNo
Qty
ClerkNo
UnitPrice
END OF
CHAPTER