First Normal Form
1NF
ELI5 — The Vibe Check
First Normal Form (1NF) is the most basic normalization rule: each column should hold one value, not a list. If your 'tags' column stores 'php,javascript,python' as one string — that violates 1NF. Break it out into a separate tags table.
Real Talk
First Normal Form requires that each column contains atomic (indivisible) values, each column contains values of a single type, and each row is unique. It eliminates repeating groups and arrays within a single column. Violating 1NF is typically solved by creating a separate table for the multi-valued attribute.
Show Me The Code
-- VIOLATES 1NF
CREATE TABLE posts (
id INT,
tags TEXT -- 'sql,postgres,database'
);
-- Correct: separate table
CREATE TABLE post_tags (
post_id INT, tag TEXT
);
When You'll Hear This
"The tags column violates First Normal Form — put them in a separate table." / "1NF is the starting point for proper database design."
Related Terms
Denormalization
Denormalization is the intentional opposite of normalization — you duplicate data to make queries faster.
Junction Table
A junction table (also called a join table) is the middle table you create to represent a many-to-many relationship.
Normalization
Normalization is the process of organizing your database to reduce data duplication.
Schema
A database schema is the blueprint of your database — which tables exist, what columns they have, what types they are, and how they relate to each other.