Learning SQL Normalization the “drafty” way

OCT GOA
3 min readMay 19, 2024

SQL Normalization

In the world of database management, organizing data efficiently is crucial for performance and data integrity.

In this article, we will explore the fundamental principles of SQL normalization, its various normal forms, and the benefits it brings to database design.

First NF :

Second NF :

Issue & Solution :

*****Trying to update the rating of jdog21 but it fails for some reason and we have its record with two different ratings !!! (Update anomaly)

*****Deleted qila19’s inventory record which affected the rating which wasn’t related to inventory stuff (Deletion anomaly)

*tina42 it would be considered as beginner but can’t be inserted to inventory cuz she has no items!! (Insertion anomaly)

Informal Definition :

Solution :

Third NF :

Issue :

Solution :

Fourth NF :

Issue :

Solution :

Fifth NF :

A relation is in 5NF if it is in 4NF and not contains any join dependency and joining should be lossless. 5NF is satisfied when all the tables are broken into as many tables as possible in order to avoid redundancy. 5NF is also known as Project-join normal form (PJ/NF).

Issue :

Solution:

Summary :

The below picture summarizes how to reach the third normal form from an unnormalized form:

I hope you liked it and learned something. If so, I would appreciate it if you could show your support, so I can continue creating more content on various topics🖤

--

--