Databases, SQL and impacts – AQA GCSE Computer Science lesson (8525)
Pupils learn to write SQL for one and two tables, insert, update and delete records, and write a levels-marked Discuss on impacts.
Lesson 6 of 7 in unit 11.4 Revision, taught in Year 11, Spring 2. It answers one big question: How do I write SQL and discuss impacts for full marks?
By the end, pupils can write SQL for one and two tables, insert, update and delete records, and write a levels-marked Discuss on impacts.
- What happens
- Bell Task: four SQL clauses to correct. Reteach 1: joining two tables in WHERE and the table-dot-field order. Reteach 2: planning a 9-mark Discuss bullet by bullet. Build: a 6-mark query and an UPDATE on the vets' database, then a 9-mark Discuss on TapRide. Challenge: Pet 7's prescriptions given before 4 February 2027 are no longer needed. Write the SQL to delete them from the Prescription table (3 marks); A new prescription, P107, is for pet 15: 2 packs of flea drops on 2027-02-12. Write the SQL to add it to the Prescription table (3 marks); Write an SQL query to return the prescription ID and the number of packs of every prescription of wormer tablets, earliest first (5 marks).
- Main task
- Write an SQL query to return the medicine name, the number of packs and the date given for every prescription of more than one pack of a medicine that costs over 10 a pack. The most recent prescription should be shown first (6 marks). A delivery has arrived, and there are now 30 packs of ear cleaner (MedicineID M03) in stock. Write the SQL to make this change to the Medicine table (3 marks). State the field in the Prescription table that links it to the Medicine table, and explain why its values do not have to be unique in the Prescription table (2 marks). Northgate Buses plans a new TapRide feature for families. A parent will see, live, where their child's bus pass was last tapped, and get an alert when the child gets off the bus. Discuss the impacts of this feature. In your answer you should consider: benefits to families and the bus company; the privacy of young passengers; legal and ethical issues (9 marks).
Also sold in the Revision unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.
An independent resource written for AQA GCSE Computer Science (8525). It is not endorsed by AQA.
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 GCSE Computer Science (AQA)
See allPupils learn to trace, explain and compare linear and binary search and bubble and merge sort, and explain efficiency.
Pupils learn to write code on paper for long code questions, earning design and program marks, and use subroutines, validation and records.
Pupils learn to convert between number bases, add binary numbers, apply shifts and calculate image, sound and Huffman sizes without a calculator.
Written for the specifications named. Not endorsed by or affiliated with any exam board.