Homeschool Guide: These lesson plans are a guide for parents. Content may contain errors — always cross-reference with official exam board specifications.

sql

FoundationHigherAll Boards

4 detailed 50-minute lessons with teaching scripts, worked examples, parent guides, and assessment criteria.

Fastmail

Lesson Overview

Total Lessons: 4
Tier: Foundation and Higher
Duration: 50 minutes per lesson (200 minutes total)
Exam Boards: AQA, Edexcel, OCR, Eduqas, CCEA

Learning Objectives

Prerequisites

Materials & Equipment

Lesson 1: Introduction: sql

Duration: 50 minutes

Starter Activity (5 minutes)

Quick Recall

Write down everything you already know about sql. Then check against the key terms: WHERE clause, ORDER BY clause, GCSE Computer Science Exam Tips. Use a mini-whiteboard or paper.

Main Content (35 minutes)

Parent/Teacher Guide:
Before lesson: Read the script below. Pre-teach key vocab: WHERE clause, ORDER BY clause, GCSE Computer Science Exam Tips.
If stuck: Re-read the revision notes (link above), then break the content into smaller steps.
Extension: See the Stretch & Challenge ideas in Lesson 4.
Teaching Script (35 mins):
Mins 0-5 - Hook: "Today: sql. By the end you will be able to answer exam questions on it unaided. It connects to the rest of Computer Science because the ideas here recur across the spec."
Mins 5-20 - Direct Instruction: Work through the core ideas below one at a time; after each, ask your student to explain it back in their own words.
Mins 20-30 - Guided Practice: Model the worked example together, then let your student attempt the first practice question with guidance.
Mins 30-35 - Independent Practice: 2-3 practice questions from Lesson 3 below, with immediate feedback.
First Look

Start with the revision notes summary, then attempt: Write an SQL query to show the first name and last name of all students in form 10B.

Plenary (5 minutes)

Check Out

Your student states one thing they learned and one question they still have about sql.

Lesson 2: Core Concepts: sql

Duration: 50 minutes

Starter Activity (5 minutes)

Review Previous Lesson

Quick recap: write 3 key points from Lesson 1 on sql. Check them against the notes below.

Main Content (35 minutes)

Definition: SQL (Structured Query Language) is the standard language used to create, read, update, and delete data in relational databases. It allows users to communicate with a database to retrieve and modify data.
WHERE clause: The WHERE clause filters records - only records that match the condition are returned. It is used with SELECT, UPDATE, and DELETE.
ORDER BY clause: The ORDER BY clause sorts the results. ASC sorts in ascending order (A-Z, 1-9). DESC sorts in descending order (Z-A, 9-1). Default is ASC if not specified.
Important: String values must be in single quotes ('Frank'). Numeric values do not need quotes (1006, 10). The order of values must match the order of fields listed. If inserting into all fields, you can omit the field list: INSERT INTO Students VALUES (1006, 'Frank', 'Chen', '10B', 10)
Warning: Always include a WHERE clause with UPDATE. If you write UPDATE Students SET Form = '10A' without a WHERE clause, it would change the Form of EVERY student in the table to 10A!
Warning: Always include a WHERE clause with DELETE. DELETE FROM Students without a WHERE clause would delete EVERY record in the table! The data would be permanently lost.
TermMeaningExample
1001AliceSmith
1002BobJones
1003ClaraPatel
1004DavidSmith
1005EveWilliams
CS01Computer ScienceMr Khan
MA01MathematicsMrs Brown
EN01EnglishMs Taylor

Practice (10 minutes)

Q: Write an SQL query to show the first name and last name of all students in form 10B.

Answer: SELECT FirstName, LastName FROM Students WHERE Form = '10B'

Plenary (5 minutes)

Explain Back

Your student teaches the key points back to you without looking. Fill any gaps immediately.

Lesson 3: Application: sql

Duration: 50 minutes

Starter Activity (5 minutes)

Quick Recall

Recall the key terms: WHERE clause, ORDER BY clause, GCSE Computer Science Exam Tips. Define each in one sentence.

Main Content (35 minutes)

Parent/Teacher Guide: Let your student attempt each question alone first, then compare with the model answer. Award method marks for correct working even if the final answer is wrong.

Q1: Write an SQL query to show the first name and last name of all students in form 10B.

Answer: SELECT FirstName, LastName FROM Students WHERE Form = '10B'

Q2: Write an SQL query to show all details of students whose last name starts with 'S', sorted by first name alphabetically.

Answer: SELECT * FROM Students WHERE LastName LIKE 'S%' ORDER BY FirstName ASC

Q3: Write an SQL statement to insert a new student: StudentID 1007, Grace Lee, form 10A, year 10.

Answer: INSERT INTO Students (StudentID, FirstName, LastName, Form, YearGroup) VALUES (1007, 'Grace', 'Lee', '10A', 10)

Q4: Write an SQL statement to change Bob Jones's form from 10B to 11B and his year group to 11.

Answer: UPDATE Students SET Form = '11B', YearGroup = 11 WHERE StudentID = 1002

Q5: Write an SQL statement to delete all students in year group 11.

Answer: DELETE FROM Students WHERE YearGroup = 11

Plenary (5 minutes)

Error Review

Review any questions answered incorrectly. Identify whether the error was knowledge, method, or reading the question.

Lesson 4: Exam Practice: sql

Duration: 50 minutes

Starter Activity (5 minutes)

Command Words

Review what these command words require: state (one point), describe (say what happens), explain (say why), compare (both sides), evaluate (judgement).

Main Content (35 minutes)

Extended Answer

Extended question: Full-Mark Response A table called Students has fields: StudentID, Name, TutorGroup, Grade. Write SQL statements to: (1) Show all students in tutor group '7B' with their names and grades. (2) Add a new student with ID 105, name 'Kai', tutor group '7B', grade 'B'. (3) Update the grade of student ID 105 to 'A'. [4 marks] <div class="

1. SELECT Name, Grade FROM Students WHERE TutorGroup = '7B'; 2. INSERT INTO Students (StudentID, Name, TutorGroup, Grade) VALUES (105, 'Kai', '7B', 'B'); 3. UPDATE Students SET Grade = 'A' WHERE StudentID = 105; Note: Text values are enclosed in single quotes. The WHERE clause in the UPDATE ensures only student 105's grade is changed — without it, ALL students' grades would be updated to 'A'.

Exam Tips: Always use single quotes for string values: 'Alice', '10A' | Never forget the WHERE clause with UPDATE and DELETE | Write SQL keywords in UPPERCASE for clarity | For SELECT, think: what fields? FROM what table? WHERE what condition? ORDER BY what? | LIKE with % for pattern matching: 'S%' = starts with S, '%son%' = contains 'son' | ORDER BY defaults to ASC - specify DESC if you want descending
Common Errors: ✗ Forgetting the WHERE clause filters rows BEFORE results are returned ✓ WHERE filters which records are included in the query results. Without WHERE, ALL records in the table are returned. Always include WHERE when you need specific records. ✗ Confusing SELECT and INSERT SQL statements ✓ SELECT retrieves/reads data from a database. INSERT adds new records to a table. SELECT is a query; INSERT modifies data. ✗ Not using quotes around text values in WHERE clauses ✓ Text/string values in SQL must be enclosed in single quotes: WHERE name = 'Alice'. Numeric values do not need quotes: WHERE age = 16. ✗ Forgetting that SQL keywords are not case-sensitive but data values are ✓ SQL keywords (SELECT,
Stretch & Challenge (Grade 8-9):
  • Synoptic links: explain how sql connects to another Computer Science topic you have studied
  • Real-world: research one real-world use or example of sql
  • Critical: "What are the limitations of the models used in sql?"

Plenary (5 minutes)

Assessment Criteria
  • Got it: Confident explanation + correct worked examples
  • Getting there: Main points OK, needs support with detail
  • Not yet: Confused on key concepts - re-run Lesson 2

Homework & Consolidation

Recommended Resources

🎓 Smart Lesson (Guided)