Unit bundle · Written for OCR A Level (H446)

Databases, SQL and Floating Point – OCR A Level Computer Science lessons (H446)

Fourteen Year 13 lessons on SQL, referential integrity, transactions, ACID and record locking, then floating point binary end to end.

Also in a bundle Year 13 A Level Computer Science – a full year of OCR H446 lessons 121 lessons for £179 · save 63% on buying separately

Students write and modify SQL, including the INSERT, UPDATE and DELETE commands examiners say are weakest, then learn how referential integrity, transactions, ACID and record locking keep shared data correct. The second half covers floating point binary: representation, normalisation and arithmetic.

Unit 13.1 is taught in Year 13, Autumn 1, and answers one big question: How do systems keep shared data safe and store non-whole numbers?

What happens in each lesson:

Lesson 1, SQL: SELECT, FROM, WHERE and ORDER BY: How do we ask a database for exactly the records we want? Main task: write SQL queries on Saltmere Ferries' Sailing table to list every Isle of Brack sailing on 14 June with fewer than 10 car spaces left, earliest first, and explain what each clause does (6 marks).

Lesson 2, SQL: joining tables: How do we bring related records from two tables together? Main task: write an SQL query that lists the surname, email and sailing date of every Saltmere Ferries passenger booked on a Brack sailing whose vehicle registration starts SM, joining Passenger and Booking with Sailing (6 marks).

Lesson 3, SQL: INSERT, UPDATE and DELETE: How do we add, change and remove records safely? Main task: write SQL statements for Saltmere Ferries to add a new booking, change the fare of booking SF2041 to 38.50, and delete every booking for the cancelled sailing S118, and state which records each changes (6 marks).

Lesson 4, Referential integrity: What stops a record pointing at data that is not there? Main task: explain how referential integrity protects Saltmere Ferries' Booking table when a clerk tries to delete a passenger who has bookings, and compare refusing the delete with cascading it (6 marks).

Lesson 5, Capturing, selecting, managing and exchanging data: How does data get into a system and move between organisations? Main task: explain how Saltmere Ferries could capture data at the vehicle check-in lane, and how it should exchange passenger lists with the port authority and fuel orders with its supplier, with one benefit of each method (6 marks).

Lesson 6, Transactions and ACID: How can a database change several records without ever being half-done? Main task: explain how each of the four ACID properties protects Saltmere Ferries' database when a passenger moves their car booking from one sailing to another (8 marks).

Lesson 7, Record locking and redundancy: What happens when two people change the same record at once? 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).

Lesson 8, Floating point: mantissa and exponent: How can a few bits hold both huge and tiny numbers? Main task: calculate the denary values of three Saltmere Ferries tide gauge readings stored with an 8-bit mantissa and 4-bit exponent, both two's complement, showing where the binary point moves each time (Reading A: 01100100 0011, Reading B: 01010000 0001, Reading C: 01110000 1111) (6 marks).

Lesson 9, Converting floating point to denary and back: How do we convert between floating point and denary? Main task: calculate the denary value of the Saltmere ferry's stored trim reading 10110000 0011, then write −3.25 and 0.1 as 8-bit mantissa and 4-bit exponent, showing the fixed point step (6 marks).

Lesson 10, Normalising floating point numbers: Why do floating point numbers need to be normalised? Main task: calculate the normalised form of two Saltmere Ferries engine readings, 00011010 0101 and 11101100 0010 (8-bit mantissa, 4-bit exponent), and explain why normalising them helps (6 marks).

Lesson 11, Range and precision: Should extra bits go to the mantissa or the exponent? Main task: compare a 12-bit floating point format with an 8-bit mantissa and 4-bit exponent to one with a 6-bit mantissa and 6-bit exponent for storing Saltmere Ferries' tide heights, and justify which suits them (6 marks).

Lesson 12, Floating point addition and subtraction: How do we add and subtract numbers with different exponents? Main task: calculate, in normalised floating point, the total and the difference of two Saltmere Ferries fuel readings, 01010000 0011 and 01100000 0001 (8-bit mantissa, 4-bit exponent), showing each step (8 marks).

Lesson 13, Exam skills: SQL and floating point questions: How do you gain every mark on SQL and floating point questions? Main task: write an SQL statement that adds a new Saltmere Ferries sailing to the Sailing table, then calculate the denary value of 10101000 0001 and normalise 00101100 0011, showing your working (10 marks).

Lesson 14, Progress Check: 38 multiple-choice questions (homework or the start of the lesson) + a 40-mark written paper in the lesson (45 minutes)

Misconceptions it tackles include
“FROM names the database, so the query starts SELECT … FROM SaltmereFerries”; “A JOIN works without an ON condition: SQL finds the matching records by itself”; “INSERT INTO only needs the values, in any order: INSERT INTO Booking ('SF2077', 'P0412', …)”. Each is planned into a hinge question before the main task or an exit question, so you find out who still holds it.
OCR H446 specification coverage
1.3.2 (b), (d)–(f), databases: methods of capturing, selecting, managing and exchanging data; interpreting and modifying SQL (SELECT, FROM, WHERE, LIKE, AND, OR, ORDER BY, JOIN, INSERT INTO, UPDATE, DELETE, DROP); referential integrity; transaction processing, ACID, record locking and redundancy; 1.4.1 (g), (h), floating point binary: representing positive and negative real numbers with a two's complement mantissa and exponent, normalisation, range and precision; floating point addition and subtraction.

It builds on 12.11 Compression, Encryption, Hashing and Databases (flat files, primary, foreign and secondary keys, entity relationship diagrams, normalisation to 3NF and indexing) and 12.3 Data Representation (two's complement, binary addition and subtraction, shifts). This unit uses those tables and that binary; it does not reteach them. It leads on to 12.12/13.2 Programming Project (students whose projects use a database write and test their own SQL), 13.6 Year 13 mocks, and 13.8 synoptic revision (Paper 1 SQL, database and floating point questions).

Adapting it for your school
No flex lesson: every lesson is needed. If time is short, set lesson 5's Build as homework; it is the shortest spec point. Teach after 12.11 and 12.3: lessons 1–4 assume keys, ER diagrams and 3NF tables; lessons 8–12 assume two's complement, binary addition and shifts. Lessons 1–4 need an SQL tool on school computers (any SQLite tool, or Python's sqlite3 module); each has a paper version. Give students a fresh copy of the database file before lesson 3 and switch on foreign key checks before lesson 4. Saltmere Ferries is fictional. Swap it for any organisation with bookings and sensors, such as a sports centre; every Build keeps its structure.

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

  • 14 lesson slide decks (PowerPoint)
  • 14 lesson plans (Word)
  • 14 worksheets, plus 13 support versions with scaffolds (Word)
  • 1 exam-style paper with mark scheme (Word)
  • Medium term plan with intent, key words, misconceptions and adaptive teaching notes (Word)
  • Progress Check lesson to assess the unit
  • saltmere
  • Exam skills - SQL and floating point questions - Quiz Quiz Trade Cards
  • Department licence: every teacher in your department can use and adapt it

In this bundle

Worth £56 bought separately at £4 a lesson. The bundle saves you 19%.

More for A Level Computer Science

See all

Written for the specifications named. Not endorsed by or affiliated with any exam board.