SQLIntermediate#normalization

What is normalization? Explain 1NF, 2NF and 3NF.

Normalization organises columns and tables to remove redundancy and update anomalies. 1NF: atomic values, no repeating groups. 2NF: 1NF plus no partial dependency on part of a composite key. 3NF: 2NF plus no transitive dependency on non-key columns.

Example
Not 1NF: student(id, phones = '9876,9123')
1NF: student_phone(student_id, phone)
3NF violation: order(id, cust_id, cust_city) — cust_city depends on cust_id, move it to customers.

Related Questions

1
SQLAdvanced#normalization

What is BCNF?

Open
2
SQLIntermediate#normalization

What is denormalization and when do you use it?

Open
3
SQLBeginner#sets

UNION vs UNION ALL?

Open