Normalization (4NF)

Piyush Kulkarni
2 min readMar 22, 2022

We have seen conditions for 3NF in the last article. Now let’s move on to 4NF.

Model #1

Color: Yellow, Green

Shape: Circle, Square

Model #2

Color: Blue

Shape: Triangle, Square

Here, we have 2 models, and we know their color and shapes as well. We now need to think about how we can design a database to store this information.

Let us make a table with this information.

Model No, Color and Shape together, has formed the primary key.

Though this data is in 3NF form, there are still chances of anomalies.

Ex. If model no. 2 also is available in green color, 2 rows will need to be added, but while updating the database if only one row gets added then it will lead to a logical inconsistency.

In this example, multivalued dependency is present.

{model} ↠{Color}

{model} ↠{shape}

4NF rule: If there are multivalued dependencies, attributes must depend on the entire primary key.

We can store the data in 4NF form as here.

4 NF
4 NF

This way of storing the data now complies with 4NF rules. .

Let’s see 5NF in the next post.

Writer: Piyush Kulkarni

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response