First Normal Form (1NF): No Nested Data
First Normal Form (1NF) means every table cell holds one single value, not a list. It's the first rule of relational databases, stopping you from storing comma-separated strings. The footgun is stuffing multiple values into one field, which breaks SQL queries.
WHY IT EXISTS Relational databases are built on a mathematical model that requires predictable, structured data. Storing lists or nested structures inside a single field breaks this model, making it impossible to query, join, and index data efficiently and reliably. 1NF is the first step to ensure data integrity and compatibility with the relational model.
THE MENTAL MODEL Think of a spreadsheet. First Normal Form is the rule that says you can't put a list of items or another mini-spreadsheet inside a single cell. Every cell must contain just one piece of data: a single name, a single number, or a single date. The table must be flat, with no repeating groups or multi-valued fields.
HOW IT WORKS To achieve 1NF, you take any column that contains multiple values and break it out into a new table. If a Customer table has a PhoneNumbers column with "555-1234, 555-5678", it violates 1NF. To fix this, you create a separate PhoneNumbers table. This new table would have columns like PhoneNumberID, CustomerID (a foreign key to the Customer table), and PhoneNumber. Now each customer can have multiple phone numbers, but each row in each table holds only one value per cell.
WHEN TO USE IT Always, for any table in a relational database system (e.g., PostgreSQL, MySQL, SQL Server). It is the "first" normal form because it is the minimum, non-negotiable requirement for a table to be considered a proper "relation" in the relational model.
WHEN NOT TO USE IT The concept of normal forms is specific to relational databases. In NoSQL databases like document stores (e.g., MongoDB), storing nested data like a JSON object or an array in a single field is a primary feature. These systems trade the strictness of the relational model for flexibility, so you don't apply 1NF in a NoSQL context.
ONE CANONICAL EXAMPLE A table of book orders is NOT in 1NF if it looks like this: OrderID: 101, Customer: "Alice", Books: "The Hobbit, Dune". The "Books" column contains a list. To make it 1NF, you create two tables. First, an Orders table (OrderID: 101, Customer: "Alice"). Second, an OrderItems table with rows like (OrderID: 101, Book: "The Hobbit") and (OrderID: 101, Book: "Dune"). Now every cell contains a single, atomic value.
Read the original → en.wikipedia.org
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.