You are on page 1of 5

Database

Normalization

Submitted To:
Miss. Kiran

Submitted by:
Javeria Ismail
Roll#: 20
Q1: Convert it into 1NF, 2NF, 3NF and also identify dependencies given below table.

Normalization:
Normalization is a processed of removing the anomalies. Here are the most commonly
used normal forms :
1. 1NF
2. 2NF
3. 3NF
4. BCNF

First Normal Form (1nf):

In this form we remove the repeating group of columns.

Steps:

1. Separate the repeating fields and enter them in a new row, or make a new data.
2. Make a primary key.
Primary Key

Project Code Project Title Project Manager Project Budget


PC010 Pensions System M Phillips 24500
PC045 Salaries System H Martin 17400
PC064 Hr System K Lewis 12250
Composite Key (Unique Key)

Project Code Employee No. Employee Department Department Hourly Rate


Name No. Name
PC010 S10001 A Smith L004 IT 22.00
PC010 S10030 L Jones L023 Pensions 18.50
PC010 S21010 P Lewis L004 IT 21.00
PC045 S10010 B Jones L004 IT 21.75
PC045 S10001 A Smith L004 IT 18.00
PC045 S31002 T Gilbert L028 Database 25.50
PC045 S13210 W Richards L008 Salary 17.00
PC064 S31002 T Gilbert L028 Database 23.25
PC064 S21010 P Lewis L004 IT 17.50
PC064 S10034 B James L009 HR 16.50

Second Normal Form (2nf):

Steps:

1. Remove the partial dependencies.


2. If B depends on A then we put the field B in a new table where B will b primary key and also a
foreignKey
Primary key.

Project Code Project Title Project Manager Project Budget


PC010 Pensions System M Phillips 24500
PC045 Salaries System H Martin 17400
PC064 Hr System K Lewis 12250

Composite Key

Project Code Employee No. Hourly Rate


PC010 S10001 22.00
PC010 S10030 18.50
PC010 S21010 21.00
PC045 S10010 21.75
PC045 S10001 18.00
PC045 S31002 25.50
PC045 S13210 17.00
PC064 S31002 23.25
PC064 S21010 17.50
PC064 S10034 16.50
Primary Key

Employee No. Employee Department Department Hourly Rate


Name No. Name
S10001 A Smith L004 IT 22.00
S10030 L Jones L023 Pensions 18.50
S21010 P Lewis L004 IT 21.00
S10010 B Jones L004 IT 21.75
S31002 T Gilbert L028 Database 25.50
S13210 W Richards L008 Salary 17.00
S10034 B James L009 HR 16.50

Third Normal Form (3nf):

Steps:

1. Remove the transitive dependencies.


2. A functional dependencies in which field functionally dependent on another key , not on
primary.
3. Make a separate table.

Primary Key

Project Code Project Title Project Manager Project Budget


PC010 Pensions System M Phillips 24500
PC045 Salaries System H Martin 17400
PC064 Hr System K Lewis 12250

Composite Key

Project Code Employee No. Hourly Rate


PC010 S10001 22.00
PC010 S10030 18.50
PC010 S21010 21.00
PC045 S10010 21.75
PC045 S10001 18.00
PC045 S31002 25.50
PC045 S13210 17.00
PC064 S31002 23.25
PC064 S21010 17.50
PC064 S10034 16.50
Primary Key

Employee No. Employee Name Department No.


S10001 A Smith L004
S10030 L Jones L023
S21010 P Lewis L004
S10010 B Jones L004
S31002 T Gilbert L028
S13210 W Richards L008
S10034 B James L009

Foreign Key Relationship

Primary Key

Department No. Department Name


L004 IT
L023 Pensions
L028 Database
L008 Salary
L009 HR

You might also like