It is a technique in which we are decomposing the existing data into different tables which reduces the redundency and undesirable characteristics like insertion, updation , deletion operation performed in database.
Normalization of database means we are normalizing the given database.It mainly used for two purpose only, they are:
- Eliminating the redundent(useless) data from the database.
- Data is stored in different table in should be relevant and make dependencies i.e. all data is logically stored
Normalization have the following rules that divides it into the form known as Normal Form, they are:
- First Normal Form
- Second Normal Form
- Third Normal Form
First Normal Form(1NF)
In this nomal form, no two row or columns have the same data element i.e. each set of column must have the unique value. in this normal form data redundency get increases as there are many columns have the same data into their columns but each row should be unique.
In this we are having the details of student in the database table of a school, we are appllying the 1NF as defined in the below table view
Second Normal Form(2NF)
In this normal form, the data which is already stored in 1NF, its all attributes within the table should be solely dependent in the unique identity of that entity.
In this we are applying the 2NF in the above define table , we are decomposing the table into twop tables like Student table and Address table as below
Third Normal Form
In this normal form, we are providing the non-prime attribute of each table must be dependent on the Primary key. In this we are creating the transitive dependencies which help in data integrity.
In the above table define in 2NF we are giving the primary key to each table and assign dependency on it.
Boyce-Codd normal form (BCNF)
This is the highest version of 3NF, it is based on the concept of Determinant, in which some attribute is fully functionaly dependent. The relation in a bcnf if and only if every determinant is a candidate key.