Back to course

First Normal Form (1NF)

Database Fundamentals: From Zero to Hero

Lesson 34: First Normal Form (1NF)

1NF is the basic requirement for a table to be considered part of the relational model.

Rule 1: Atomic Values

Every column in a row must contain a single, atomic value. 'Atomic' means indivisible.

  • Violation Example: Having a PhoneNumbers column that contains a list of multiple phone numbers ('555-1234, 555-5678').
  • Correction: Split the complex data into multiple columns (HomePhone, WorkPhone) or, preferably, move it into a separate, related table (PhoneNumbers linked by a Foreign Key).

Rule 2: No Repeating Groups

There should be no repeating columns (fields used multiple times to store the same type of data).

  • Violation Example: A table with columns Item1, Item2, Item3, Item4 to store products in an order.
OrderIDItem1Item2Item3
100MilkEggsBread
101ChairNULLNULL
  • Correction: Create a separate OrderItems table and link it back to the Orders table using a Foreign Key (creating a 1:N relationship).
OrderID (FK)ItemName
100Milk
100Eggs
100Bread
101Chair

This structure ensures we adhere to the 1NF rule: each cell holds only one value, and there are no repeating structural groups.