Normal Forms in SQL

Home

Blogs

Normal Forms in SQL

Written by

Carissa O'Connell

June 2022; Updated: Jan 2024

Normalization is essential for a database integrity because it creates a data table that has eliminated anomalies and reduced redundancy by displaying only related data. Normalization utilizes a series of tests to identify the suitable relations that support the data requirements of the enterprise. The stages of organization are called normal forms.

First Normal Form

Before carrying out 1NF (first normal form), I would take into consideration the attributes or group of attributes that would act as the key attributes for the unnormalized table. Once they have been identified, the table should display a single valued attributes and a unique name for each attribute or column.

Second Normal Form

Before carrying out 2NF (second normal form), it is important to take into consideration, the primary key for the 1NF relation, the functional dependencies in the relation and if there are any partial dependencies which exist on the primary key by removing them in a new relation along with the copy of their determinant.

Third Normal Form

Before using 3NF I would take into consideration if there is a non-primary-key attribute which is transitively dependent on any candidate key. In the case there is a transitive dependency on the primary key, the transitively dependent attribute(s) would be removed by placing them in a new relation with a copy of the determinant.

Image placeholder
Carissa O'Connell

Aloha! I am a passionate software developer looking to help people create programs that help improve business efficiency, connect with nature, and play with logic.