2. Normalizing a database
ï Process of organizing data in database
ï Avoid duplicate values
ï Inconsistent dependencies
ï Each table describes one entity
ï Goal is Typically 3rd Normal Form
ï Each Form represents a different level
ï Each subsequent form requires that previous forms
already in place
ï To be in Third Normal Form, must already be in First
and Second Normal Form
3. First Normal Form
ï Each row/column combination has only one value
ï Eliminate repeating groups
ï Instead of using a single field for all items purchased, set up item and
quantity fields
1st Normal Form
Not Normalized OrderID
OrderID CustomerID
CustomerID OrderDate
OrderDate ItemID
Items Purchased Quantity
ItemName
4. Second Normal Form
ï Remove fields that are not fully dependent on the key, and place in separate
table(s)
ï ItemID is not dependent on the CustomerID and OrderID; it is dependent on
OrderID.
1st Normal Form
2nd Normal Form
OrderID
CustomerID OrderID OrderID
OrderDate CustomerID ItemID
ItemID OrderDate Quantity
Quantity ItemName
ItemName
5. Third Normal Form
ï All non-key columns are mutually independent
ï ItemName depends on ItemID
3rd Normal Form
2nd Normal Form OrderID OrderID
OrderID OrderID CustomerID ItemID
CustomerID ItemID OrderDate Quantity
OrderDate Quantity
ItemName ItemID
ItemName
6. Normalization Summary
ï A change in one field should not require change in
another field in the table
ï No calculations
ï All fields help describe the key
ï Each record is unique
ï Each table stores information about one âthingâ