A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

First and Second Normal Forms

College Depth 73 in the knowledge graph ☐ I know this ☆ Set as goal
8topics build on this
335prerequisites beneath it
See this on the map →
Functional DependenciesEntity-Relationship Diagrams→→Boyce-Codd Normal Form and Higher Normal FormsThird Normal Form and BCNF
normalization 1NF 2NF data anomalies redundancy partial dependency

Core Idea

Normalization is the process of organizing a relational schema to eliminate data redundancy and update anomalies by decomposing tables based on functional dependencies. First Normal Form (1NF) requires each attribute to contain only atomic, indivisible values with no repeating groups or arrays in a cell. Second Normal Form (2NF) builds on 1NF by requiring that every non-key attribute be fully functionally dependent on the entire primary key — eliminating partial dependencies where a non-key attribute depends on only part of a composite key.

How It's Best Learned

Start with a deliberately denormalized flat-file table (e.g., an order form with customer info repeated on every line item) and trace the anomalies. Decompose step-by-step to 1NF then 2NF, noting which anomalies each step eliminates.

Common Misconceptions

Explainer

Normalization is a disciplined process for structuring relational tables to avoid redundancy and the data anomalies that come with it. You already understand functional dependencies — the idea that one set of attributes uniquely determines another. Normalization uses functional dependencies as the diagnostic tool: wherever you find a dependency that violates a normal form's rules, you decompose the table to fix it.

Consider a flat table tracking student course enrollments: StudentID, StudentName, CourseID, CourseName, InstructorName. If a student takes three courses, their name is stored three times. If you update the student's name in one row but not the others, you have an update anomaly. If you delete the student's last enrollment, you lose the student's name entirely — a deletion anomaly. If you want to record a new student who hasn't enrolled yet, you can't without a CourseID — an insertion anomaly. These anomalies are the symptoms that normalization cures.

First Normal Form (1NF) requires that every cell contains a single, atomic value — no lists, no sets, no repeating groups. A table that stores a student's courses as "CS101, CS102, CS103" in one cell violates 1NF. The fix is to create separate rows: one per student-course pair. This seems basic, but it is the foundation everything else builds on. Without atomic values, you cannot write reliable queries (how do you JOIN on a comma-separated list?) or enforce constraints (how do you set a foreign key on one item in a list?).

Second Normal Form (2NF) eliminates partial dependencies — situations where a non-key attribute depends on only part of a composite primary key. In our enrollment table with composite key (StudentID, CourseID), StudentName depends only on StudentID and CourseName depends only on CourseID. These are partial dependencies: the non-key attributes don't need the full key to be determined. The fix is to decompose into three tables: Students(StudentID, StudentName), Courses(CourseID, CourseName, InstructorName), and Enrollments(StudentID, CourseID). Now each fact is stored exactly once, eliminating the update anomalies. Note that 2NF only applies when the primary key is composite — a table with a single-column primary key cannot have partial dependencies and is automatically in 2NF.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Set Operations: Union, Intersection, and Complement → Cartesian Products and Relations → Partial Orders → Binary Relations → Functional Dependencies → First and Second Normal Forms

Longest path: 74 steps · 335 total prerequisite topics

Prerequisites (2)

Leads To (2)