Unit 2
Unit 2
Unit-2
Normalization
❖ Normalization
In Relational Database design, the process of organizing data to minimize redundancy.
Normalization usually involves dividing a database into two or more tables without
losing information and defining relationships between the tables.
The Normal Form is a state of a relation that results from applying some criteria
on that relation.
Various normal forms are given below:
1) First Normal Form (1NF)
2) Second Normal Form (2NF)
3) Third Normal Form (3NF)
4) Boyce-Codd Normal Form (BCNF)
5) Forth Normal Form (4NF)
6) Fifth Normal Form (5NF)
First Approach:
Determine maximum allowable values for multi-valued attribute.
Insert separate attribute for multi valued attribute and insert only one value on one attribute and
Page 1 of 3
Advanced Database Management System Notes
Second Approach:
Remove multi valued attribute and place it in a separate relation along with the primary
key of a given original relation.
So, above table can be created as follows:
Customer:
Cid Name Society City
C01 Emily Nana Bazar Anand
C02 Jeniffer C.G.Road Ahmedabad
C03 Peter M.G.Road Rajkot
Customer_Contact:
Cid Contact_No
C01 9879898798
C01 7877855416
C02 9825098254
C03 9898787898
A relation R is in second normal form (2NF) if and only if it is in 1NF and every non-
prime attribute of relation is fully dependent on the primary key.
Example:
In the above table, we have partial dependency; let us see how,The prime key attributes are
StudentID and ProjectID.
As stated, the non-prime attributes i.e. StudentName and ProjectName should be functionally
Page 2 of 3
Advanced Database Management System Notes
To remove Partial Dependency and violation on 2NF, decompose the above tables
StudentInfo
ProjectInfo
StudentID ProjectName
P09 Geo Location
P07 Cluster Exploration
P03 IoT Devices
P05 Cloud Deployment
The normalization of 2NF relations to 3NF involves the removal of transitive dependencies. If a
transitive dependency exists, we remove the transitively dependent attribute(s) from the relation
by placing the attribute(s) in a new relation along with a copy of the determinant.
Example:
For this relation in given table STUD_NO -> STUD_STATE and STUD_STATE ->
STUD_COUNTRY are true. So STUD_COUNTRY is transitively dependent on STUD_NO. It
violates the third normal form.
To convert it in third normal form, we will decompose the relation STUDENT (STUD_NO,
STUD_NAME, STUD_PHONE, STUD_STATE, STUD_COUNTRY_STUD_AGE) as:
STUDENT (STUD_NO, STUD_NAME, STUD_PHONE, STUD_STATE, STUD_AGE)
STATE_COUNTRY (STATE, COUNTRY)
Page 3 of 3