Database normalization

Sourabh Kundu
3 min readSep 14, 2021

--

What is database normalization?

Database normalization is the process of structuring a database, usually a relational database, in accordance with a series of so-called normal forms in order to reduce data redundancy and improve data integrity.

Normalization divides the larger table into the smaller table and links them using some relationships.

Database Normal Forms

Here is a list of Normal Forms in SQL:

  • 1NF (First Normal Form)
  • 2NF (Second Normal Form)
  • 3NF (Third Normal Form)
  • BCNF (Boyce-Codd Normal Form)
  • 4NF (Fourth Normal Form)
  • 5NF (Fifth Normal Form)
  • 6NF (Sixth Normal Form)

1NF (First Normal Form) Rules

  • Each table cell should contain a single value.
  • Each record has to be distinctive(Unique).

1NF Example

2NF (Second Normal Form) Rules

  • Rule 1- Be in 1NF
  • Rule 2- Single Column Primary Key that does not functionally dependant on any subset of candidate key relation

2NF Example

It is clear that we can’t move forward to make our simple database in 2nd Normalization form unless we partition the table above.

We have divided our 1NF table into two tables viz. Table 1 and Table2. Table 1 contains member information. Table 2 contains information on movies rented.

3NF (Third Normal Form) Rules

  • Rule 1- Be in 2NF
  • Rule 2- Has no transitive functional dependencies

To move our 2NF table into 3NF, we again need to again divide our table.

3NF Example

Below is a 3NF example in the SQL database:

We have again divided our tables and created a new table which stores Salutations.

There are no transitive functional dependencies, and hence our table is in 3NF

4NF (Fourth Normal Form) Rules

If no database table instance contains two or more, independent and multivalued data describing the relevant entity, then it is in the 4th Normal Form.

5NF (Fifth Normal Form) Rules

A table is in 5th Normal Form only if it is in 4NF and it cannot be decomposed into any number of smaller tables without loss of data.

6NF (Sixth Normal Form) Proposed

6th Normal Form is not standardized, yet however, it is being discussed by database experts for some time. Hopefully, we would have a clear & standardized definition for the 6th Normal Form in the near future…

That’s all to SQL Normalization!!!

Conclusion

  • Database designing is critical to the successful implementation of a database management system that meets the data requirements of an enterprise system.
  • Normalization in DBMS is a process that helps produce database systems that are cost-effective and have better security models.
  • Functional dependencies are a very important component of the normalized data process
  • Most database systems are normalized databases up to the third normal form in DBMS.

There is always much more to learn!!!

--

--