Record locking and redundancy – OCR A Level Computer Science lesson (H446)
Students learn to explain how record locking prevents lost updates, how it can cause deadlock, and how redundancy protects data.
Lesson 7 of 14 in unit 13.1 Databases, SQL and Floating Point, taught in Year 13, Autumn 1. It answers one big question: What happens when two people change the same record at once?
By the end, students can explain how record locking prevents lost updates, how it can cause deadlock, and how redundancy protects data.
- The Build (the main task)
- Explain how record locking stops two Saltmere Ferries clerks selling the last car space on a sailing at the same time, how this could lead to deadlock, and how redundancy protects the bookings if a disk fails (6 marks).
- Support version
- A two-column timeline (Clerk A, Clerk B) for the last-space sale, first without and then with locking, with the reads and writes printed and the lock steps to add.
- Challenge
- Discuss whether Saltmere should keep one central booking database or a copy at each harbour office (9 marks, levels-marked 7–9 / 4–6 / 1–3).
- Real-world link
- Saltmere's ticket office and website both try to sell the last car space on the 08:15 to Brack.
- Key words
- Record locking, Deadlock and Concurrent, each with a definition, an icon and a common mix-up on the key vocabulary slide.
- Misconceptions it tackles
- “If two clerks update the same record at once, both changes are saved, so nothing is lost”; “Deadlock makes the system crash”.
- OCR H446 specification
- 1.3.2 (f).
Every lesson follows the same Code & Commerce structure: a Bell Task recall starter, key vocabulary with definitions and icons, short teaching chunks with a check before pupils move on, The Build (one main task), challenge questions that get harder, and an exit question. Answers reveal one at a time on the slides, and everything is editable PowerPoint and Word.
Students can do it all on paper.
Also sold in the Databases, SQL and Floating Point unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.
An independent resource written for OCR A Level Computer Science (H446). It is not endorsed by OCR or Cambridge University Press & Assessment. Programming project (NEA) lessons teach general skills on a made-up example project and give supervised time, within JCQ's rules on the help a centre may give.
What's included
- Slide deck (PowerPoint)
- Lesson plan (Word)
- Worksheet (Word)
- Support worksheet with scaffolds (Word)
- Single-teacher licence: use and adapt it with your own classes
More for A Level Computer Science
See allStudents learn to write and interpret SQL queries using SELECT, FROM, WHERE (with AND, OR) and ORDER BY on one table.
Free sample lessonStudents learn to write SQL that joins two tables on a foreign key and filters records with LIKE and wildcards.
Students learn to write INSERT INTO, UPDATE, DELETE and DROP statements and predict exactly which records each one changes.
Written for the specifications named. Not endorsed by or affiliated with any exam board.