Unit 6: Building tables and changing data

Create tables with the right rules, add, change and remove rows safely, group changes into transactions, and design tables that don't contradict themselves.

The big picture

So far you have only read data. Real systems also write it — and writing is where data gets damaged. Constraints stop bad rows getting in, transactions stop half-finished changes, and normalisation stops the same fact being stored twice and drifting apart.

Lessons in this unit