0% found this document useful (0 votes)
4 views

normalization_database

Normalization is the process of organizing data to eliminate redundancy, ensure correct table storage, and avoid restructuring when adding data, with five levels of normal form. The document explains the first three normal forms (1NF, 2NF, 3NF) with examples, emphasizing the importance of unique records and dependencies on primary keys. It illustrates how to achieve these normal forms through structured tables and the elimination of non-key field dependencies.

Uploaded by

razel gicale
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

normalization_database

Normalization is the process of organizing data to eliminate redundancy, ensure correct table storage, and avoid restructuring when adding data, with five levels of normal form. The document explains the first three normal forms (1NF, 2NF, 3NF) with examples, emphasizing the importance of unique records and dependencies on primary keys. It illustrates how to achieve these normal forms through structured tables and the elimination of non-key field dependencies.

Uploaded by

razel gicale
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 14

What is normalization?

 The process by which we efficiently


organize data to achieve these goals:
 Eliminating redundancy
 Ensuring data is stored in the correct
table
 Eliminating need for restructuring
database when data is added
 Five levels of normal form
 In order to achieve one level or normal
form, each previous
THIRD NORMAL level must
FORM IS SUFFICIENT beTYPICAL
FOR MOST met
DATABASE APPLICATIONS
First Normal Form (1NF)

 There are no repeating or duplicate fields


 Each cell contains only a single value
 Each records is unique.
 Identified by primary key
Example
Item Colors Price Tax
T-shirt Red 12.00 0.60
T-shirt Blue 12.00 0.60
Polo Red 12.00 0.60
Polo Yellow 12.00 0.60
Sweatshirt Blue 25.00 1.25
Sweatshirt black 25.00 1.25

 Table is now in first normal form


Second Normal Form (2NF)

 All non-key fields depend on all


components of the primary key
 Guaranteed when primary key is a
single field.
Example
Item Colors Price Tax
T-shirt Red 12.00 0.60
T-shirt Blue 12.00 0.60
Polo Red 12.00 0.60
Polo Yellow 12.00 0.60
Sweatshirt Blue 25.00 1.25
Sweatshirt black 25.00 1.25

 Table is not in second normal form


because:
 Price and tax depend on item, but not
in color
Example:
Item Color Item Price Tax
T-shirt Red T-shirt 12.00 0.60
T-shirt Blue Polo 12.00 0.60
Polo Red Sweatshir 25.00 1.25
Polo Yellow t
Sweatshirt Blue
Sweatshirt black

 Tables are now in second normal form


Third Normal Form (3NF)

 No non-key field depends upon


another
 All non-key fields depend only on the
primary key.
Example:
Item Color Item Price Tax
T-shirt Red T-shirt 12.00 0.60
T-shirt Blue Polo 12.00 0.60
Polo Red Sweatshir 25.00 1.25
Polo Yellow t
Sweatshirt Blue
Sweatshirt black

 Tables are not in third normal form


because:
 Tax depends on price, not item
Example:
Item Color Item Price Tax
T-shirt Red T-shirt 12.00 0.60
T-shirt Blue Polo 12.00 0.60
Polo Red Sweatshir 25.00 1.25
Polo Yellow t
Sweatshirt Blue
Sweatshirt black Price Tax
12.00 0.60
25.00 1.25

 Tables are now in third normal form


Another Example
Name Assignment1 Assignment2
Jeff Smith Article Poetry Analysis
Summary
Nancy Jones Article Reaction
Summary Paper
Jane Scott Article Poetry Analysis
 Table is not in first normal form because:
Summary

 Assignment field repeating


 First and last name in one field
 No (guaranteed unique) primary key
field
Example:
AssingmentID Color Assignment StudentID
1 Article Id
summary 1 1
2 Poetry analysis 1 2
3 Reaction paper 1 3
2 1
StudentI First Last 2 3
D name name 3 2
1 Jeff Smith
2 Nancy Jones
3 Jane Scott
 Tables are now in third normal form

You might also like