Database design
Planning a database with an entity-relationship model, turning it into tables, and normalizing tables so that each fact is stored once.
About 7 hours of study
Learning objectives
- Find entities, attributes and relationships
- Turn an ER model into tables
- Recognise anomalies and functional dependencies
- Normalize to 3NF losslessly
Lessons
- 1
Designing a database: the ER model
Entities, attributes and relationships; one-to-one, one-to-many and many-to-many; participation and weak entities; and the rules that turn an ER diagram into tables.
- 2
Normalization
Why one big table goes wrong (update, insert and delete anomalies), functional dependencies, and the normal forms 1NF, 2NF, 3NF and BCNF that split it into good tables.
Module practice
- How many students in each courseEasy
- Credits per studentMedium
- Build the junction tableHard
- Find the update anomalyEasy
- Move the course facts into their own tableMedium
- A lossless decomposition, checkedHard