Skip to content
PlayOwl

Coding · Grade 12

Data Models and Persistent State

Learners design the data layer of a capstone: entities, primary and foreign keys, one-to-many and many-to-many relationships with link tables, and normalisation to avoid update, insertion and deletion anomalies. They query real in-memory SQLite databases with SELECT, JOIN, GROUP BY and IS NULL from Python, and persist state safely with serialisation round trips, transactions, parameterised queries and planned migrations.

  • 4 lessons
  • About 105 minutes
  • Check what you learned: 8 questions
  • Ways to answer: choose an answer, trace code, match pairs, type a number, sort into groups and true or false
Try it now (no account) One of the five free starter courses Open in PlayOwl

What learners will discover

  • Model data with entities, attributes, primary and foreign keys, and one-to-many and many-to-many relationships.
  • Normalise data so each fact is stored once, avoiding update, insertion and deletion anomalies.
  • Query relational data with SELECT, WHERE, JOIN, GROUP BY, ORDER BY and IS NULL.
  • Persist state safely using serialisation, transactions, parameterised queries and planned migrations.

Lessons

  1. Modelling data 5 steps2 practiceabout 22 min
  2. Normalisation 5 steps3 practiceabout 20 min
  3. Querying with SQL 5 steps3 practiceabout 24 min
  4. Persisting state safely 4 steps3 practiceabout 20 min
  5. Check what you learned 8 questions at the end

Keep exploring

More 12th grade coding

Guide for grown-ups