Why Normalise?

Normalisation removes data redundancy and update anomalies by organising tables to reduce dependency.

Normal Forms

  • 1NF: All attributes are atomic (no repeating groups).
  • 2NF: 1NF + no partial dependency (non-key attribute depends on the full primary key).
  • 3NF: 2NF + no transitive dependency (non-key attribute depends only on the primary key).
  • BCNF (Boyce-Codd NF): Stronger version of 3NF — every determinant must be a candidate key.

Example

Table: OrderDetail(OrderID, ProductID, ProductName, Quantity)
Issue: ProductName depends on ProductID, not on the full key (OrderID, ProductID) — violates 2NF.
Fix: Split into Order(OrderID, ProductID, Quantity) and Product(ProductID, ProductName).