S5 Term 1 | ICT: Database Design and SQL – Keys, Normalisation and Queries | Tutor Lesson Plan | 45-minute flow, teaching script, common errors, practice with answers
- 2026-12-05
Lesson prep guide · S5 Term 1 ICT
Students can write SELECT but cannot say why a table should be split, and they treat a candidate key as a second primary key. This lesson starts from what is wrong with one wide table, moves to three query patterns, and ends with page counts and index comparisons.
01 Prior knowledge check (first 3 minutes)
If any item below fails, fix it first, or this lesson stalls:
| Skill | Quick check | Pass standard |
|---|---|---|
| Percentage | 96,000 out of 216,000 | 44.4 per cent |
| Rounding up | 640,000 divided by 4,096 | 156.25, so 157 pages |
| Averages | AVG against SUM | AVG divides by the count, SUM only adds |
| Conditions | WHERE against HAVING | WHERE filters rows, HAVING filters aggregates |
02 Lesson flow (45 minutes)
| Time | Stage | Tutor does | Student does |
|---|---|---|---|
| 0–5 min | Diagnostic | Draws a five-column table and asks what is wrong | Most say it looks messy |
| 5–17 min | Keys and 1NF | Candidate key, primary key, alternate key, atomic values | Spots the two-value phone cell |
| 17–29 min | Splitting, 2NF and 3NF | Partial and transitive dependency, then join back by foreign key | Writes both tables |
| 29–39 min | Four query patterns | WHERE, ORDER BY LIMIT, GROUP BY HAVING, COUNT with AND | Rewrites each and checks the result |
| 39–43 min | Pages and indexes | Total size over page size, rounded up; an index turns scans into logarithms | Works out pages for 2,000 rows |
| 43–45 min | Exit check | Collects three answers, noting key, normalisation or clause errors | Answers without notes |
03 Teaching script (read it aloud)
Act one: keys and first normal form
Have students name the normal form broken by the phone example and write the two columns of the new table.
Students repeat: candidate keys qualify, the primary key is the chosen one, and each cell holds one value.
Act two: splitting tables, 2NF and 3NF
Have students write both tables and mark the foreign key.
Students repeat: 2NF removes partial dependency, 3NF removes transitive dependency, and the parts join back by foreign key.
Act three: four query patterns and data volume
Students repeat: WHERE filters rows and HAVING filters aggregates, products multiply while joins pair, and pages always round up.
04 Question types and steps
| Type | Example | Steps | Answer |
|---|---|---|---|
| Keys | student number and identity card | list candidate keys, then choose one | both are candidate keys; the student number is primary |
| Normalisation | two phone numbers in one cell | name the broken form and create a one-to-many table | breaks 1NF; add a Phone table |
| Query | top three in 5A | WHERE, ORDER BY, LIMIT | SELECT name, score FROM Scores WHERE class = ‘5A’ ORDER BY score DESC LIMIT 3 |
| Volume | 2,000 rows at 320 bytes, 4,096 bytes a page | total size over page size, rounded up | 157 pages |
Normalisation is not just splitting tables: the parts must join back through keys. Pages round up, so 156.25 pages means 157, and an index turns a linear scan into a logarithmic search.
05 Three independent practice questions
| Question | Answer | What to observe |
|---|---|---|
| Write the query for the top three students in class 5A by score. | SELECT name, score FROM Scores WHERE class = ‘5A’ ORDER BY score DESC LIMIT 3; | missing ORDER BY, or putting LIMIT before WHERE |
| List each student whose average is at least 60. | SELECT name, AVG(score) FROM Scores GROUP BY student_id, name HAVING AVG(score) >= 60; | filtering an average with WHERE, or omitting GROUP BY |
| 2,000 rows at 320 bytes with 4,096-byte pages: how many pages at least? | 640,000 over 4,096 is 156.25, so 157 pages | rounding down to 156 |
06 Common errors and correction lines
| Error | Student usually writes | Tutor says |
|---|---|---|
| Candidate key as runner-up | “the identity card is the second primary key” | Both are candidate keys; only one is chosen as primary. |
| Two values in one cell | two numbers in the phone column | One value per cell, so the second number needs its own table. |
| WHERE on an aggregate | WHERE AVG(score) at least 60 | An average is an aggregate, so it belongs in HAVING. |
| Pages rounded down | 156 pages given | 156.25 pages means page 157 is used, so round up. |
07 Homework (paper and question numbers)
- S5 ICT paper on number systems, part two questions 5 to 8: primary and candidate keys, a 5A name query in ascending order, the normal form broken by a two-number phone cell, and the Cartesian product of Orders and Customers several candidate keys with one chosen as primary; SELECT Name FROM Student WHERE Class = ‘5A’ ORDER BY Name ASC; it breaks 1NF; 12 times 25 is 300
- S5 ICT paper on SQL and algorithms, question 1 parts 1 to 4: top three in 5A, averages of at least 60, 2,000 rows at 320 bytes, and normalising the Clubs table ORDER BY score DESC LIMIT 3; GROUP BY with HAVING; 640,000 bytes, so 157 pages; split into Students and Clubs joined by a foreign key
08 Exit check (last 3 minutes)
| Question | Answer | Verdict |
|---|---|---|
| How do primary and candidate keys relate? | Candidate keys qualify; the primary key is the chosen one | “second primary key” means act one must be retaught |
| 2,000 rows over 4,096 bytes gives how many pages? | 156.25, so 157 pages | 156 pages means act three must be retaught |
| What do WHERE and HAVING filter? | WHERE filters rows, HAVING filters aggregates | Swapping them means act three must be retaught |
09 Tutor FAQ
Which year is this page for?
S5 Term 1 databases; S4 spreadsheets and database basics, and S6 SQL revision, can start here.
Can normalisation and SQL fit in 45 minutes?
Yes: 12 minutes on keys and 1NF, 12 on splitting with 2NF and 3NF, 10 on the four query patterns, 4 on pages and indexes, and 7 for the diagnostic, practice and exit check.
Should JOIN syntax be taught here?
No. This page covers the idea and the Cartesian product; ON conditions and LEFT JOIN belong to another page.
Find a tutor freeTutor sign-up →
©2026 TutorZone · www.tutorzone.com.hk · Terms of use · All rights reserved. Original TutorZone material for personal study and teaching only; not for resale or republication.



