Before understanding the First Normal Form, one must have the knowledge of what is Normalization and why is it done? Normalization in general terms is the technique of organizing the data into the database in order to reduce the insertion, deletion and updation anomaly and to remove data redundancy. This process divides the larger tables into smaller ones and links them with each other through relationships of the primary and foreign keys. Duplicate and unnormalized data not only consumes extra memory but makes it difficult to manage the table while insertion, deletion, and updation of tables as the number of data increases. Therefore it is very important to normalize the tables before designing the database of any application.
First Normal Form written as 1NF sets the fundamental rules of data normalization and is the first form used while normalizing the data of tables. It sets certain basic principles of data normalization which needs to be fulfilled by every table. Some of the principles are given below:
According to the main principles of 1NF mentioned above,
| Emp_id | Emp_name | Emp_age | Emp_address |
| 101 | Raghu | 25 | Xyz colony, agra, 258996 |
| 102 | Rakesh | 28 | Flat 304, xyz road, lucknow, 568975 |
| 103 | Rahul | 45 | House no .123, near hospital, varanasi, 245687 |
As the Emp_address has so much data for address, for a single Employee, To be in 1NF, the above table can be decomposed into two below given tables:
| Emp_id | Emp_name | Emp_age |
| 101 | Raghu | 25 |
| 102 | Rakesh | 28 |
| 103 | Rahul | 45 |
Table2: Employee_address (After 1NF)
| Emp_id | Emp_houseno | Emp_city | Emp_pincode |
| 101 | House no. 564, Xyz colony | agra | 258996 |
| 102 | Flat 304, xyz road | lucknow | 568975 |
| 103 | House no .123, near hospital | varanasi | 245687 |
| Emp_id | Emp_years_of_ex perience | Emp_dept | Emp_projects |
| 101 | 3 | IT | abc,jkl |
| 102 | 2 | IT | bcd |
| 103 | 5 | Accounts | Abc, cfg,xyz, hjk |
| Emp_id | Emp_years_of_ex perience | Emp_dept | Emp_projects |
| 101 | 3 | IT | abc |
| 101 | 3 | IT | jkl |
| 102 | 2 | IT | bcd |
| 103 | 5 | Accounts | Abc |
| 103 | 5 | Accounts | cfg |
| 103 | 5 | Accounts | xyz |
| 103 | 5 | Accounts | hjk |
Table: Emp_projects having multiple repeating values in the above example can be broken down further into two tables to reduce repetition:
There should not be repeating values present in the table. Repeating values consumes a lot of extra memory and also makes the search and update slow and maintenance of the database becomes difficult. For example, In the above table of Employee_Projects, there are a lot of unnecessary repeating values of Emp_id, Emp_years_of_experience, and Emp_dept so a new table needs to be created for this in order to reduce the repetition of values.
Table1:
| Emp_id | Emp_years_of_experienc e | Emp_dept |
| 101 | 3 | IT |
| 102 | 2 | IT |
| 103 | 5 | Accounts |
Table2:
| Emp_id | Emp_projects |
| 101 | abc |
| 101 | jkl |
| 102 | bcd |
| 103 | Abc |
| 103 | cfg |
| 103 | xyz |
| 103 | hjk |
Below given are some of the advantages of First Normal Form (1NF):
While working with the databases and creating tables for any application in the starting, it is very important to normalize all the tables as it helps to eliminate insertion, deletion and update anomalies. Normalization also removes future costs and time. Fewer null values and lesser redundant data makes the database more compact. Through Normalization more tables are created which helps in the easy and efficient maintenance of data. Through Normalization obviously the better performance of searching and sorting is ensured through indexes and keys and 1NF plays a vital role in it.
Not a member yet? Register now
Are you a member? Login now