
This lesson covers what a DBMS actually does (data dictionary, logical schema, integrity, security, the developer interface and the query processor), then moves on to writing SQL DDL: CREATE DATABASE, CREATE TABLE, ALTER TABLE, primary keys and foreign keys with REFERENCES.
The SQL runs for real in Python using sqlite3, so students create linked tables and then watch the database reject a membership for a student who doesn’t exist. Referential integrity becomes something they’ve seen happen, not just a definition.
What’s included
- 16-slide editable teacher PowerPoint, with speaker notes on every slide
- Python starter code with guided TODOs and the full tested solution, in a Word file ready to copy into your editor (including a referential integrity test)
- Student worksheet (34 marks) in Word and PDF: key terms, choosing data types, completing CREATE and ALTER statements, fixing SQL errors and an exam-style DDL question
- Full answer key in Word and PDF
How the lesson runs
- A starter on what controls a database
- Features of a DBMS, then SQL data types
- Key vocabulary: DBMS, data dictionary, schema, query processor and DDL
- Worked SQL: CREATE DATABASE and CREATE TABLE, then foreign keys and ALTER TABLE
- A spot-the-mistake slide on missing foreign keys
- A data type mini task with answers
- A summary of DDL statements
- A Python/SQL task, exam-style question with mark scheme, and exit ticket
Written for Cambridge International AS & A Level Computer Science (9618), Paper 1 Theory Fundamentals, and pitched at AS Level (Year 12). Everything is editable, so you can adapt it for your own classes.
Please leave a review if you find it useful. It really helps!
Something went wrong, please try again later.
This resource hasn't been reviewed yet
To ensure quality for our reviews, only customers who have purchased this resource can review it
Report this resourceto let us know if it violates our terms and conditions.
Our customer service team will review your report and will be in touch.