Sitemap
Tharaka Dissanayake

Tharaka Dissanayake

Associate Engineer-java

Database Normalization

2 min readAug 9, 2022

Introduction

Press enter or click to view image in full size

Database normalization is a technique to organize data into multiple related tables. Normalization will reduce the data redundancy (repeated data). Also, it stops anomalies. There are three anomalies

  • Insertion Anomalies
  • Updating Anomalies
  • Deletion Anomalies
Press enter or click to view image in full size
table-1

Insertion anomalies

Consider the above table (table-1). If you want to add a new student, you must add the department name and phone. But think, you need to add 1000 student records. You need to add 1000 department records. It is a wasting cost. It is insertion anomalies.

Get Tharaka Dissanayake’s stories in your inbox

Join Medium for free to get updates from this writer.

Updating anomalies

If we want to change the department phone number, we need to change each place the phone number has appeared. Again, it will be a costly waste.

Deletion Anomalies

If we delete all the students’ records on the above table (table-1), department data is also removed. Then we can not get department details. It is called deletion anomaly.

We use database normalization to avoid them. There are several normalizations. In the following articles, we will discuss those normalizations.

  • First Normalization Form (1NF)
  • Second Normalization Form (2NF)
  • Third Normalization Form (3NF)
  • Boys Code Normalization Form (BCNF)
  • Fourth Normalization Form (4NF)

--

--