Database Management Systems - Prof. Holowczak

Zicklin School of Business - Baruch College
City University of New York

Database Management Systems


Normalization

What You'll Learn

Pratt/Adamski Rob/Coronel (5th ed)Elmasri/Navathe (3rd) ed. Kroenke (7th ed.) Hoffer, Prescott & McFadden (6th ed) Mata-Toledo / Cushman
Chapter 5 Chapter 4 Chapter 14 and 15 Chapter 5 Chapter 5 and Appendix B Shaum's Outlines Ch. 4 and 5

The Relational Model

The process we are following is:

  1. Gather user/business requirements.
  2. Develop the E-R Model (shown as an E-R Diagram) based on the user/business requirements.
  3. Convert the E-R Model to a set of relations in the relational model
  4. Normalize the relations to remove any anomalies (***).
  5. Implement the database by creating a table for each normalized relation.

Functional Dependencies

Keys and Uniqueness

Modification Anomalies

Normalization

First Normal Form (1NF)

Second Normal Form (2NF)

Third Normal Form (3NF)

Boyce-Codd Normal Form (BCNF)

Fourth Normal Form (4NF)

Fifth Normal Form (5NF)

Domain Key Normal Form (DK/NF)

De-Normalization


All-in-One Example

Many of you asked for a "complete" example that would run through all of the normal forms from beginning to end using the same tables. This is tough to do, but here is an attempt:

Example relation:
EMPLOYEE ( Name, Project, Task, Office, Phone )

Note: Keys are underlined.

Example Data:

Name Project Task Office Floor Phone
Bill 100X T1 400 4 1400
Bill 100X T2 400 4 1400
Bill 200Y T1 400 4 1400
Bill 200Y T2 400 4 1400
Sue 100X T33 442 4 1442
Sue 200Y T33 442 4 1442
Sue 300Z T33 442 4 1442
Ed 100X T2 588 5 1588

First Normal Form

Second Normal Form

Third Normal Form

Boyce-Codd Normal Form

Forth Normal Form

At each step of the process, we did the following:

  1. Write out the relation
  2. (optionally) Write out some example data.
  3. Write out all of the functional dependencies
  4. Starting with 1NF, go through each normal form and state why the relation is in the given normal form.

Another short example

Consider the following example of normalization for a CUSTOMER relation.

Relation Name
CUSTOMER (CustomerID, Name, Street, City, State, Zip, Phone)

Example Data
CustomerID Name Street City State Zip Phone
C101 Bill Smith 123 First St. New Brunswick NJ 07101 732-555-1212
C102 Mary Green 11 Birch St. Old Bridge NJ 07066 908-555-1212

Functional Dependencies

CustomerID -> Name, Street, City, State, Zip, Phone
Zip -> City, State

Normalization

As a final step, consider de-normalization.


File: week5.html Date: 1:20 PM 9/7/2005
All materials Copyright, 1997-2005 Richard Holowczak