Decomplexify on YouTube · Open on YouTube
Core skills: building for the web · Advanced beginner · Lesson 24 of 98 · 29 min video, then about 1 week of practice
Designing a relational schema
After this you can design tables, keys, relationships and constraints for a small application and explain your normalisation choices.
Why it matters
A bad schema causes bugs for years; a good one makes most features easy. Learn to identify entities and relationships, choose primary and foreign keys, model one-to-many and many-to-many relationships, and use constraints (NOT NULL, UNIQUE, foreign keys) to make invalid data impossible. Understand normalisation well enough to know when you are duplicating data and why that is risky. Trap: storing lists in a text column or skipping foreign keys 'for flexibility'. The database is your last line of defence for data integrity.
How to use this resource
Normalisation explained clearly with good examples in under half an hour.
Go further
Go deeper