It is the process off organizing data to minimize data redundancy, which in turn ensures data consistency.
Normalization rules divides larger tables into smaller tables and links them using relationships. The purpose of Normalization in SQL is to eliminate redundant (repetitive) data and ensure data is stored logically.
Problem of data redundancy:2. Data Inconsistency
3. DML query can become slow
First NF:
- The data in each column should be atomic.
- The table doesn't contain any repeating column
- Identify each record uniquely using primary key
Convert below Table into First Normal Form:
Convert into First Normal form:
- The table meet all the condition of 1 NF
- Move redundant table to a separate table
- Create relationship between these table using foreign key
Convert above Table into 2nd NF:
Third Normal Form
- Meet all the condition of 1NF and 2 NF
- doesn't contain columns that are not fully dependent upon the primary key or transitive functional dependencies