Difference between 1NF and 3NF in DBMS

1. First Normal Form (1NF) :
An entity that does not have any repeating columns or data groups can be termed as the First Norm. 1NF is the First normal form, which provides the minimum set of requirements for normalizing a relational database. A table that complies with 1NF assures that it actually represents a relation (i.e. it does not contain any records that are repeating), but there is no universally accepted definition for 1NF. One important property is that a table that comply with 1NF could not contain any attributes that are relational valued i.e. all the attributes should have atomic values.

Some rules to be followed are :

  • There should be a unique name to be specified for each attribute within the table.
  • It should not contain any composite attributes.

Example :

ROLL NUMBER STUDENT NAME MARKS
1 Arpit 78
2 Ayush 68
3 Arjun 89

As this relation does not contain any composite or multi-valued attributes then this relation is in 1NF.

2. Third Normal Form (3NF) :
It mean a table is considered in third normal if the table/entity is already in the second normal form and the columns of the table/entity are non-transitively dependent on the primary key.



If a transitive dependency exists, we remove the transitively dependent attribute(s) from the relation by placing the attribute(s) in a new relation along with a copy of the determinant Most of the 3NF tables are free of insertion, update, and deletion anomalies. 3NF is used to reduce data duplication and to attain data integrity.

Example : Consider relation R (E, F, G, H, I)

E -> FG, 
GH -> I, 
F -> H, 
I -> E 

All possible candidate keys in above relation are {E, I, GH, FG} All attribute are on right sides of all functional dependencies are prime.



Difference between 1NF and 3NF :

S.No. 1NF 3NF
1. In order to be in 1NF any relation must be atomic and should not contain any composite or multi-valued attributes. In order to be in 3NF there should be no transitive dependency that is no non prime attribute should be transitively dependent on the candidate key.
2. The functional dependency is not necessary for first normal form. In 3NF the functional dependencies are already in 1NF and 2NF.
3. 1NF is considered less stronger normal form. 3NF is considered as a stronger normal form than the 1NF.
4. 1NF contains candidate keys which automatically comply with 2NF. 3NF form will require decomposing a table that is in the 2NF or 1NF.
5. It eliminate duplicate columns from the same table. It remove columns that are not dependent upon the primary key.
6. It take less computational time. It takes more computational time.
7. The goal of the first normal form is to ensure that there are no repeating groups of data. The goal of the third normal form is to ensure referential integrity.
8. There are No Composite Attributes. There are No Transitive Functional Dependencies.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up


If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.