Normalisation, E-R diagrams and SQL scripts
Watch the whole lecture free
Make a free account to watch every lecture to the end: 1 worked example, 5 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.
That was the teaching part. The rest of this lecture is free with an account: 1 worked example, 5 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.
No password needed now: we email you a link to set one. Already have an account? Sign in, then come back to this page.
The teaching part (1 min) is free to watch. A free account opens the whole lecture: 1 worked example, 5 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.
What this lecture covers
- Design it once, query it forever
- First normal form
- Second and third normal form
Read the transcript of the teaching part
Last time
Before we start: last time, in Relational databases, you learned these points. Here they are again on one card. Keep them in mind, because today builds on them.
Design it once, query it forever
A badly designed database repeats data, so every update is a risk. Normalisation is the cleaning process that splits tables until every fact is stored in one place. And once the tables are right, SQL is the language you use to create them, fill them, and ask questions of them.
First normal form
A table is in first normal form if every field holds a single value, and there are no repeating groups of fields. A field called Items holding hammer, nails, saw breaks the rule. Each item needs its own row. Each table also needs a primary key.
Second and third normal form
Second normal form: in 1NF, and every non-key field depends on the whole of the primary key. It matters when the key has two fields. Third normal form: in 2NF, and no non-key field depends on another non-key field. A simple memory aid: every field depends on the key, the whole key, and nothing but the key.
Chapter 8: Databases
- File-based and relational databases, keys and DBMS features 7 min
- Normalisation, E-R diagrams and SQL scripts 7 min
Also for A Level Computer Science 9618
Which topics come up most in A Level Computer Science 9618 past papers, counted from every paper since 2004: Paper 1 topic frequency, Paper 2 topic frequency.