First Normal Form (1NF): Atomic Values & Repeating Groups
Eliminate repeating groups and ensure atomic cell values for 1NF.
In plain words
One box, one value. If something can have many values, give each value its own row in another table.
Think of it like…
A contacts card with a fixed set of three phone boxes: the fourth number gets squeezed into a margin and nobody can find it. Store one phone number per line instead, and the list can be as long as it needs to be.
Where you’ve seen it
products(id, name, tags) with tags = 'red,summer,sale' can't use an index to find all 'sale' products and can't stop typos like 'sael'. Moving to product_tags(product_id, tag) with one row per tag makes WHERE tag = 'sale' a simple indexed lookup and lets a foreign key validate tags.
Words you’ll hear
- Atomic value
- A single value of the column's type, used as a whole.
- Repeating group
- Numbered columns (phone1, phone2…) or a list stuffed into one column.
- Child table
- A separate table with one row per value, linked by a foreign key.
- Arrays / JSON
- Supported by PostgreSQL; fine as a single value, not when you query the elements individually.
Visual diagram
Theory & example queries
The two classic violations
Lists in a column: tags, skills or phone numbers stored as comma-separated text. You can't index individual items, LIKE '%sale%' also matches 'wholesale', counting items needs string splitting, and nothing stops invalid or duplicate entries.
Repeating groups of columns: phone1, phone2, phone3 or q1_sales … q4_sales. They cap how many values you can store, leave most columns NULL, and force queries to check every column (WHERE phone1 = ? OR phone2 = ? OR phone3 = ?).
Before: WHERE phone1 = $1 OR phone2 = $1 OR phone3 = $1. After normalising to customer_phones(customer_id, phone): WHERE phone = $1, one indexed lookup.
What "atomic" really means
Atomic is about how you use a value, not whether it could be split. A date has a year, month and day, but it's atomic because you treat it as one date. A full address can be atomic for a shipping label, but not if you regularly filter by city, in which case city deserves its own column.
PostgreSQL arrays and JSONB columns don't strictly break 1NF if they're treated as one value, and they're practical for things like a small list of display labels. Once you need to filter, join, count or validate the elements individually, a child table is usually the better design.
CREATE TABLE product_tags ( product_id bigint REFERENCES products (id), tag text NOT NULL, PRIMARY KEY (product_id, tag));PostgreSQL is the lesson baseline unless noted otherwise.
Identify the table or database object the statement will modify.
Expected output
Note: Representative PostgreSQL status when products already exists and the table name is available.
Key takeaway: If you query the parts, store the parts separately.
How it works, step by step
Follow one practical SQL workflow from start to finish. Select any step or play through the flow.
Look for lists and numbered columns
Scan the schema for comma-separated values and column names ending in 1, 2, 3.
tags = 'a,b,c' · phone1, phone2
When to use it & trade-offs
What it is
A table is in First Normal Form (1NF) when every cell holds a single value of its column's type (no lists like 'red,blue,green'), there are no repeating groups of columns (no phone1, phone2, phone3), and each row can be identified by a key. Lists and repeated columns move into a separate child table with one row per value.
Why it matters: Comma-separated lists and numbered columns look convenient until you need to query them: "which products are tagged red?" turns into string matching, counts go wrong, and you can't add a fourth phone number without changing the schema. 1NF is the first thing interviewers check when you design a table.
When to reach for it
- Tags, categories, skills and phone numbers with a variable count
- Any value you need to search or count individually
- Fixing tables with numbered columns
When to avoid or be careful
- Storing lists as delimited strings
- Adding column4 when column3 fills up
- Splitting values that are always used whole (like a date) just to look "more atomic"
Child table vs array/JSON column vs delimited text
Strengths: Indexable, constraint-checked, unlimited values.
Watch out: One more table and a join to read the list.
Strengths: No join; PostgreSQL can index arrays with GIN.
Watch out: Weaker validation and less portable.
Strengths: Easy to write.
Watch out: Can't be indexed, validated or counted reliably.
Interview signals & numbers to know
When this topic comes up
- “Normalise this table”
- Comma-separated values in a column
- phone1, phone2, phone3
- “What is 1NF?”
- LIKE '%…%' to search inside a list
Benchmarks & rules of thumb
- 1
- value per cell
- 0
- repeating groups of columns
- 1 row
- per value in the child table
Common mistakes & follow-ups
Common interview mistakes
- Searching tags with LIKE '%sale%' and matching 'wholesale' too.
- Designing phone1 to phone3 columns and then needing a fourth.
- Assuming any array column automatically breaks 1NF, or that it's always fine.
Likely interviewer follow-ups
- How would you redesign a table that stores skills as a comma-separated list?
- Is a PostgreSQL array column a violation of 1NF?
- What's the difference between 1NF and 2NF?
Knowledge check
Put it into practice
Practice related interview Q&A
Apply First Normal Form (1NF): Atomic Values & Repeating Groups with hands-on SQL practice and interview Q&A.