1NF and 2NF
First normal form: one value per cell
A table is in 1NF when each cell holds a single value from its column's domain, with no lists and no repeating groups.
This breaks it:
| StudentID | StudentName | PhoneNumbers |
|---|---|---|
| S101 | Asha | 9876543210, 9811122233 |
| S102 | Kabir | 9899000011 |
With two numbers in one cell, it's hard to find a student by phone number, make each number unique, change just one of them, or count numbers per student.
Fix it by giving each value its own row, or better, its own table:
| StudentID | PhoneNumber |
|---|---|
| S101 | 9876543210 |
| S101 | 9811122233 |
| S102 | 9899000011 |
Repeating columns break it too. Phone1, Phone2, Phone3 fall apart the day someone has four numbers, and waste space for people with none. A separate StudentPhone table handles any number.
"Atomic" depends on the model. A date or a full name can be split into parts, but if your domain treats it as one value, one per cell is fine.
1NF fixes the shape of values, not repetition between rows. A table can be in 1NF and still full of anomalies, like the one-big-table example in 1.8.
Second normal form: the whole key
A table is in 2NF when it's in 1NF and no non-prime column depends on just part of a candidate key. So 2NF only matters when a key has more than one column.
Enrollment(StudentID, CourseID, StudentName, CourseTitle, Grade), key (StudentID, CourseID):
| StudentID | CourseID | StudentName | CourseTitle | Grade |
|---|---|---|---|---|
| S101 | C10 |