Normalization
Normalization
Definition
• Normalization is the process of organizing the data in the database.
• Normalization divides the larger table into the smaller table and links them using
relationship.
• The normal form is used to reduce redundancy from the database table
Types of Normal Forms
The decomposition of the EMPLOYEE table into 1NF has been shown below:
Example of 1NF(Cont’d)
Relation STUDENT in table 1 is not in 1NF because of multi-valued attribute STUD_PHONE.
Its decomposition into 1NF has been shown in table 2.
Second Normal Form (2NF)
•In the second normal form, this full functional dependency means that it
meets the requirements of First Normal Form (1NF), and all non-key
attributes are fully functionally dependent on the primary key.
Let's assume, a school can store the data of teachers and the subjects they teach. In
a school, a teacher can teach more than one subject.
Here, EMP_STATE & EMP_CITY dependent on EMP_ZIP and EMP_ZIP dependent on EMP_ID. The
non-prime attributes (EMP_STATE, EMP_CITY) transitively dependent on super key(EMP_ID). It
violates the rule of third normal form.
That's why we need to move the EMP_CITY and EMP_STATE to the new <EMPLOYEE_ZIP> table,
with EMP_ZIP as a Primary key
Example of 3NF(Cont’d)
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.
Example of 3NF(Cont’d)
as:
It is an advance version of 3NF that’s why it is also referred as 3.5NF. BCNF is stricter
than 3NF. A table complies with BCNF if it is in 3NF and for every functional
dependency X->Y, X should be the super key of the table.
Example of Normalization
Example of Normalization
Example of Normalization
“A winner is a dreamer
who never gives up”
– Nelson Mandela