Database normalization is the process of organising the data in a relational database to minimise data redundancy. Normalization is a systematic approach of decomposing tables to eliminate data redundancy and undesirable characteristics like Insertion, Update and Deletion Anomalies.
There are two reasons of the normalization process:
- To eliminating redundant data, for example, storing the same data in more then one table.
- Ensuring data dependencies make scene.
Both of these worthy goals as they reduce the amount of space a database consumes and ensure that data is logically stored.
Normalization of a database is achieved by following set of rules called “forms” in creating a database.
Normalization rule are divided into following normal form.
- First normal form
- Second normal form
- Third normal form
- Boyce – codd Normal form
- Fourth normal form
- Fifth normal form
1. First Normal form
As per First Normal Form, no two Rows of data must contain same information i.e each set of column must have a unique value, such that multiple columns cannot be used to fetch the same row.
Also, as per First normal form, a column of a table cannot hold multiple values like separated. It should hold only atomic values.
2. Second Normal form
As per Second Normal form, A table that is in first normal form (1NF) must meet additional criteria if it is to qualify for second normal form. Specifically: a table is in 2NF if it is in 1NF and no non-prime attribute is dependent on any proper subset of any candidate key of the table. A non-prime attribute of a table is an attribute that is not a part of any candidate key of the table.
3. Third Normal form
As per the Third Normal for, The entity should be in Second Normal form and no column entry should be dependent on any other entry other than the key column for the table. If such entry exists, move it outside into a new table.
4. Boyce – codd Normal form
As per Boyce – codd Normal form, A table is said to be in BCNF if it is in 3NF and contains each and every determinant as a candidate key.
5. Fourth Normal form
As per Fourth Normal form, A table is said to be in 4NF if it is in BCNF and contains no multi-valued dependencies.
6. Fifth Normal form
As per Fifth Normal form, A table is said to be in 5NF if it is in 4NF and contains no join dependencies.