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
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
Problems and anomalies in 1NF(first normal form):
We can not insert the information of an employee who does not have a phone no.
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.
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:
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!