DEV Community

Pranav Bakare
Pranav Bakare

Posted on

1 1 1 1 1

Normalization | 1 NF

First Normal Form (1NF)

It is the most basic level of database normalization. A table is in 1NF if it meets the following criteria:

  • Atomic Values: All the columns should contain atomic (indivisible) values, meaning each cell in the table should hold a single value. No multiple values (like a list) in a single cell.
  • No Repeating Groups: There should be no repeating groups or arrays in the table. Each piece of data should be stored in a separate row and column.

Example of a Table Not in 1NF

Image description

OrderID CustomerName    PizzaSize   Toppings
001 Alice   Medium  Pepperoni, Mushrooms
002 Bob Large   Sausage, Olives
003 Charlie Small   Pepperoni
Enter fullscreen mode Exit fullscreen mode

Issues:

The Toppings column contains multiple values (e.g., "Pepperoni, Mushrooms"), which violates 1NF because each cell should have only a single, atomic value.

Transforming to 1NF
To bring this table into 1NF, we need to ensure that each cell contains a single value:

Image description


Summary

A table is in 1NF when:

  • Each column contains atomic, indivisible values.
  • There are no repeating groups or arrays within rows.
  • 1NF helps ensure data consistency by breaking down data into the smallest meaningful units, making it easier to search, sort, and manage.

API Trace View

How I Cut 22.3 Seconds Off an API Call with Sentry

Struggling with slow API calls? Dan Mindru walks through how he used Sentry's new Trace View feature to shave off 22.3 seconds from an API call.

Get a practical walkthrough of how to identify bottlenecks, split tasks into multiple parallel tasks, identify slow AI model calls, and more.

Read more →

Top comments (0)

Billboard image

Try REST API Generation for MS SQL Server.

DreamFactory generates live REST APIs from database schemas with standardized endpoints for tables, views, and procedures in OpenAPI format. We support on-prem deployment with firewall security and include RBAC for secure, granular security controls.

See more!

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay