Database Normalization removes redundancy of data and anomalies in a poorly designed table. The process of normalization converts an unnormalized table in a normalized form.
Let us see what flaws are in an Unnormalized table i.e. why Normalization of Database is so crucial −
Storing same data item multiple times is known as Data Redundancy.
Let us see an example −
We have an <Employee> table that has a field to store current address of Employees. Some of these employees are given a place to live by the company; therefore, they have the same address. The address will be repeated in the database −
Table 1.1
EmpID | EmpName | EmpAddress |
E001 | Emma | 20, Street 17, Connecticut |
E002 | Jack | 20, Street 17, Connecticut |
E003 | Adams | 20, Street 17, Connecticut |
E004 | John | 21, Street 17, Connecticut |
E005 | Rocky | 21, Street 17, Connecticut |
To solve it, store the employee address in a separate table and point in the <Employee> table.
It occurs when you face issues while updating a table.
Let’s say the company decide to close a Department in the company, then the deletion of row would also lead the deletion of that employees data.
It occurs when you try to insert data in a record that does not exist.
Normalization removes all the above issues/ anomalies and gives you a normalized perfect database design that a database administrator love.