• Skip to main content

CPlatt Design

Creating a Visually Stunning Web

  • Blog
  • Contact

What is 1st Normal Form (1NF) in Database Design?

March 16, 2023 by Chris Platt Leave a Comment

The first normal form (1NF) is the initial step in the normalization process of database design. The purpose of 1NF is to ensure that a database table has a single value for each attribute, and that each attribute is atomic, meaning it cannot be further divided into smaller pieces of data.

In other words, a table is in 1NF if:

  1. All attributes contain only atomic values.
  2. Each attribute has a unique name.
  3. Each record in the table is unique and identified by a primary key.

To understand this better, let’s look at some examples.

Example 1

Suppose we have a table called “Customers” with the following columns: Customer ID, Name, Phone Numbers. In this table, the Phone Numbers column contains multiple phone numbers separated by commas.

Customer IDNamePhone Numbers
1John Doe555-1234,555-5678
2Jane Doe555-9876,555-4321

This table is not in 1NF because the Phone Numbers column violates the atomicity rule. Instead of a single value for each phone number, there are multiple phone numbers separated by commas. To bring this table into 1NF, we need to split the Phone Numbers column into separate columns, each containing a single phone number.

Customer IDNamePhone Number 1Phone Number 2
1John Doe555-1234555-5678
2Jane Doe555-9876555-4321

Example 2

Suppose we have a table called “Orders” with the following columns: Order ID, Order Date, Customer Name, Item Name, Quantity. In this table, the Customer Name and Item Name columns contain multiple values for each attribute.

Order IDOrder DateCustomer NameItem NameQuantity
12022-01-01John Doe, Jane DoeBook, CD1, 2
22022-01-02Jane Doe, Bob SmithDVD, Book1, 3

This table is also not in 1NF because the Customer Name and Item Name columns contain multiple values separated by commas. To bring this table into 1NF, we need to split these columns into separate tables and use a foreign key to link them to the Orders table.

Order IDOrder DateCustomer IDItem IDQuantity
12022-01-01111
12022-01-01222
22022-01-02231
22022-01-02313
Customer IDName
1John Doe
2Jane Doe
3Bob Smith
Item IDItem Name
1Book
2CD
3DVD

By splitting the Customers and Items columns into separate tables, we have eliminated the multiple values problem and ensured that each attribute contains only atomic values. We can now link the Customers and Items tables to the Orders table using foreign keys.

1NF is the first step in the normalization process of database design. It ensures that a table has a single value for each attribute and that each attribute is atomic. By bringing a table into 1NF, we can avoid data redundancy and improve data integrity.

Interested in a Website?

Get started today and take the first step towards a professional online presence.

Contact Us

Filed Under: Database Design, Development, Programming, Web

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

CPlattDesign © 2012–2023