learning-it by example

Back to the video

Normalisation 1NF to 3NF on a Messy Spreadsheet

Three ordinary changes broke a flat table of 5 rows; four tables took all three.

Video #252 ยท Data modelling

Steps in the video

  1. 0:00 Three changes broke a flat table. Four tables took all three.
  2. 0:39 The idea
  3. 1:16 Setup
  4. 1:34 The sheet, and first normal form
  5. 2:04 Three changes on the flat table
  6. 2:39 Four tables
  7. 3:19 Splitting with SQL
  8. 3:41 The same three changes
  9. 4:00 Run the flat table
  10. 4:56 What this does not show
  11. 5:26 Mistakes to avoid
  12. 5:54 My take and next steps
  13. 6:24 Recap

Files

  • flat.py (46 lines)
  • normal.py (43 lines)
  • run.py (27 lines)

Download the code (zip)

Tested with

Python 3.12.15

What this does not show

A made-up three-order sheet in SQLite; it stops at third normal form and does not measure query speed.

Sources

Learning IT by Example.