What is1NF(First Normal Form)?/ Problems with 1NF?/What is 1nf example?

A relation is in 1NF(What is 1nf example) or first normal form if every tuple has exactly one value for each attribute. In other words, we can say that every column should have a unique or atomic value related to the corresponding attribute.

Within this blog(First Normal Form), we are going to explore What is 1nf example? What is 1nf 2nf and 3nf? Why is this table not in 1nf? How do you write 1nf? 1NF example, 3NF example, BCNF vs 3NF, BCNF example, Step by step normalization example The need for normalization in DBMS|What is 1nf example|

A database is in first normal form if every relation includes in a database is in 1NF(What is 1nf example).

First normal form deals only with the basic structure of the relationship and does not resolve the problems of redundant information and any other anomalies|What is 1nf example|

Let’s understand this with the help of an example of an organization where we have information about employee_id, employee_name, phone number, and their salary|What is 1nf example|

Table 1. Non-Domain Form

emp_idemp_nameemp_phone_nosalary
101Priya94243410,000
102Ashish999348
999347
7,000
103Mayank99932815,000
104Piyush989312
989313
20,000

Here we can see that an employee can have more than one phone number so, each tuple of the above table does not have only one value for each attribute.

For converting it into a 1NF(First Normal Form) we use the following steps-

  • For each repeating field, value creates a new tuple.
  • Insert the repeating field value in that field of the new tuple
  • duplicate the values of all other attributes of the original tuple and put them in a new tuple.

In our example, we have a phone_no field of Ashish and Piyush have repeating value. So we have to create new tuples only for these two employees. See the changes in the below table.

Table 1.1 Normalized Form

emp_idemp_nameemp_phoneemp_salary
101Priya 942434 10,000
102Ashish 999348
7,000
102Ashish 999347 7,000
103Mayank 999328 15,000
104Piyush 989312
20,000
104Piyush 989313 20,000
(First Normal Form)

Problems and anomalies in 1NF(first normal form):

Insert:

We can not insert the information of an employee who does not have a phone no.

Delete:

If we delete a whole first tuple of a particular employee then we delete not only the phone no of an employee but also lose other information such as salary and employee_id.

For example: if we delete a tuple of employee Priya whose phone is disconnected then we also lose other information of Priya such as salary.

Update:

In this form of the relation 1NF, we have the same information repeated many times. If we want to update some information, for this first we have to search for all the tuples containing that information and then update all the tuples.

for example: if the salary of Piyush gets incremented to 25000 and we want to this information in our relation, for this first of all we have to search all the tuples having employee name ‘Piyush’ and then update the salary to 25000 of each tuple. But if we forget updation of any of tuple named Piyush then it will result in inconsistency. to avoid this we go for 2NF.

Check it out some amazing blog post related to Normalization:

What is Normalization and why is it needed?

What is 2NF in DBMS?

What is 3NF in DBMS?

What is BCNF in DBMS?

Conclusion:

Even after converting our data table into 1NF(First Normal Form) where we have unique or single tuple value for a particular attribute we have redundancy and anomalies problem with us. So for removing the problems of 1NF we have to go for 2NF. So in our next blog post, we will update you with the same|What is 1nf example|

Using this blog post(First Normal Form) we have gone through Within this blog, we are going to explore What is 1nf example? What are 1nf 2nf and 3nf? Why is this table not in 1nf? How do you write 1nf? 1NF example, 3NF example, BCNF vs 3NF, BCNF example, Step by step normalization example, The need for normalization in DBMS|What is 1nf example|

Hope! you would have liked this blog(What is 1nf example). Please feel free to let us know if you have any doubts about this post. You can also write to us at [email protected]. Have a good time!

Anurag

I am a blogger by passion, a software engineer by profession, a singer by consideration and rest of things that I do is for my destination.