šŸ“ Learn

Database Normalisation

Why Normalise?

Bad design causes big problems

Without normalisation, databases suffer from anomalies:

  • Insertion anomaly — you can't add data without also adding unrelated data
  • Update anomaly — changing one fact requires updating many rows
  • Deletion anomaly — deleting a row accidentally removes other important info
  • Normalisation is the process of organising a database to reduce these problems.

    āš ļø Un-normalised table (BAD)
    student_name subject teacher_name teacher_email
    AliceMathsMr Smithsmith@school.edu
    BobMathsMr Smithsmith@school.edu
    AliceScienceMs Jonesjones@school.edu