First Normal Form | Normalization 1NF with real life examples

In my previous article i have explained the normalization with examples.In this article i would like to explain First Normal Form of data. We need to check all the normal forms to make your database normalized.This article gives you information about first normal form in depth.First Normal Form is nothing but the property of relation in relational database.In this article i would like to give examples of converting the De-normalized table in to First Normal Form table.

What is First Normal Form (1NF) ?

E.F.Codd has presented the paper 1971 and he has given the definition of 1NF in that paper.When none of domains have any sets as elements that relation will be called as 1NF. The 1NF is normal form will satisfy following conditions,

1.The data in this normal form contains Atomic values.

So here question in mind that what exactly mean by atomic values.

Atomic Values : The Atomic values are values where single cell contains single value.

Example of Atomic values :

Lets say there is one column in table named Department and it has two values in cell ; Oracle,PL SQL,SQL.Means One cell contains different values.

2.Each record needs to be unique and there should not be any repeating groups.

So here another question comes to picture is about repeating groups.

Repeating Groups : Repeating group means a table contains 2 or more values of columns that are closely related.

Example of Repeating groups :

The repeating groups means if you have ‘Name’ and ‘Salary1′,’Salary2′,’Salary3’ columns which contains only salary data.These are all repeating group data.

The first normal form enforces following criteria :

1.User needs to eliminate repeating group in individual tables.

2.User need to create separate table for each set of related data.

3.User need to define the primary key for related data.

First Normal Form

First Normal Form (1NF ) Example :

Lets take example for de-normalized table,

Employee NoEmployee NameDepartment
2RajivPL SQL

The above table is denormalized table.So here everyone have question in mind that why this table is denormalized format?The Department column does not contain Atomic values for Employee no. 1 .There is step-wise process to convert De-Normalized table in to normalized form.

Step 1 :

Check the automic values and create table with new column and remove that atomic values.So User need to create one new table with Atomic values. So in following table ,each cell contains only one value.

Employee No Employee Name Department Department1
1 Rohan SQL   Oracle
2 Rajiv PL SQL  
3 Ram Java  

Step 2 :

The table is converted in to Atomic values table but repeating group is still there in the table. User need to eliminate reporting groups. In above table the Department and Department1 are two repeating groups.User needs to split single table in to two different tables.

First Table : Employee table

Employee NoEmployee Name

Second Table: Department table

Employee NoDepartment

These are two tables which are in to normalized form.I hope you like this article on First Normal Form.If you like this article or if you have any suggestions with the same kindly comment in comments section.

Leave a Reply

Your email address will not be published. Required fields are marked *