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
- 0:00 Three changes broke a flat table. Four tables took all three.
- 0:39 The idea
- 1:16 Setup
- 1:34 The sheet, and first normal form
- 2:04 Three changes on the flat table
- 2:39 Four tables
- 3:19 Splitting with SQL
- 3:41 The same three changes
- 4:00 Run the flat table
- 4:56 What this does not show
- 5:26 Mistakes to avoid
- 5:54 My take and next steps
- 6:24 Recap
Files
- flat.py (46 lines)
- normal.py (43 lines)
- run.py (27 lines)
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.