Normalization is a process of analysing the given relation schemas according to their functional dependencies. It is used to minimize redundancy and also used to minimize insertion, deletion and update distractions. Normalization is considered as an essential process as it is used to avoid data redundancy, insertion anomaly, updation anomaly, deletion anomaly.
There most commonly used normal forms are:
- First Normal Form(1NF)
- Second Normal Form(2NF)
- Third Normal Form(3NF)
- Boyce & Codd Normal Form(BCNF)
1NF
1NF is the First Normal Form. It is the simplest type of normalization that you can implement in a database. The primary objectives of 1NF are to:
Every column must have atomic (single value)
To Remove duplicate columns from the same table
Create separate tables for each group of related data and identify each row with a unique column.
2NF
2NF is the Second Normal Form. A table is said to be 2NF if it follows the following conditions:
The table is in 1NF, i.e., firstly it is necessary that the table should follow the rules of 1NF.
Every non-prime attribute is fully functionally dependent on the primary key, i.e., every non-key attribute should be dependent on the primary key in such a way that if any key element is deleted, then even the non_key element will still be saved in the database.
3NF
3NF stands for Third Normal Form. A database is called in 3NF if it satisfies the following conditions:
It is in second normal form.
There is no transitive functional dependency.
For example: X->Z
Where:
X->Y
Y does not -> X
Y->Z so, X->Z
BCNF
BCMF stands for Boyce-Codd Normal Form. It is an advanced version of 3NF, so it is also referred to as 3.5NF. BCNF is stricter than 3NF.
A table complies with BCNF if it satisfies the following conditions:
It is in 3NF.
For every functional dependency X->Y, X should be the super key of the table. It merely means that X cannot be a non-prime attribute if Y is a prime attribute.