- From boxes to tables
The course runs the classic arc: draw the world as entities and relationships, collapse the drawing into relations, then interrogate them in SQL. Two of David's hand-drawn designs survive, a meeting-room booker and a news-broadcast schema (weak entities, role attributes and all), along with the bike-shop project's data sheet. The schema browser below draws every database's tables and foreign keys the same way.
- Five databases, one browser
University is the Silberschatz textbook's script; Family is the two-row warm-up; Cinema is the exam database; Takeaway and Bus Service are the week 12-13 exercise sets. All five were MariaDB scripts; for this page they're translated to SQLite and executed at build, and the resulting files load into sql.js (SQLite compiled to WebAssembly), so every query on this page runs in your tab. No server anywhere.
- The weekly climb
The presets trace the semester's difficulty curve: plain SELECTs, then natural joins, LEFT joins that keep the empty categories, GROUP BY with HAVING, NOT IN subqueries, and finally the correlated subquery. Week 3's notebook keeps two wrong attempts above the answer that works. Where the original used MariaDB-only machinery (session variables, stored functions, >= ALL), the preset runs an adapted SQLite version and shows the original beside it, labeled.
- An exam in nine queries
The cinema answer sheet is the December exam: ticket filters, three-way natural joins, income aggregation, movies beating their genre's average, and a stored function counting reserved seats per room. Every one runs here against the same data, and the empty-seats query still has to remember that a seat only counts as free if the room's projection that day didn't sell it.
- Changing data without breaking it
The modification panel replays the bike-shop project's INSERT / UPDATE / DELETE script with a before/after diff of every touched table and an undo that re-seeds the database. The punchline is the last step: deleting a part that a repair job still references. With foreign keys enforced SQLite refuses; with them off (MariaDB's posture in the course files) it silently orphans the repair; flip the toggle and watch both. Bus Service adds the week-13 trigger, adapted from MariaDB's SIGNAL to SQLite's RAISE, plus the insert that trips it.
- What was reconstructed (built 2026-09-01)
Honesty box: the bike-shop DDL was never archived (only the data sheet and the modification script survive), so its schema and seed rows were reconstructed for this page (labeled in the schema browser). MariaDB-to-SQLite adaptations are disclosed per preset with the originals shown. The vendored answer files have the student ID scrubbed. Every preset's results are fixture-tested: the build runs them through Python's sqlite3 and the page's sql.js path must match. TS widgets written with AI coding tools.