What is the first normal form (1NF)?

Normal forms

Normalization is the process of reducing redundancy from a set of relations. In database tables, we can use normal forms to carry out this process. The four main normal forms are:

As the figure below shows, these normal forms build upon one another progressively. In this shot, we will focus on the first normal form.

First normal form (1NF)

For a table to be in first normal form, it needs to satisfy the following conditions:

  • It should only have atomicmeans it cannot hold multiple values attributes/columns.
  • All values in a column should belong to the same domain.
  • All column names should be unique.
  • The order of data storage should not matter.

Now, let’s look at a concrete example of a table that is currently not in first normal form:

ID Person Number
1 Sultan 4324521, 5254326
2 Aasia 4924575
3 Farhan 9875325
4 Vafa 2468967, 7533678
5 Zakariya 4675379, 4646388

In the above example, the values in the Numbers column are not atomic. To decompose the table to the first normal form, we must make these values atomic. We can do this by allocating separate rows to each number, like this:

ID Person Number
1 Sultan 4324521
1 Sultan 5254326
2 Aasia 4924575
3 Farhan 9875325
4 Vafa 2468967
4 Vafa 7533678
5 Zakariya 4675379
5 Zakariya 4646388
New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources