2026 07 23 Data Scientist 0110¶
π― Session Summary¶
I walked the first window of the Data Scientist β Level 0110 "Database Mastery" arc as a learner: five linked main_quests (Database Fundamentals β Data Modeling β SQL Mastery β Database Migrations β Database Security), all built on a single PostgreSQL 16 spine. The sealed execute-engine evidence scored 4 of 5 quests (2 pass, 2 warn) at an average 78.5%; the fifth, Database Migrations, produced no verdict β the engine hit the sandbox's sudo/docker permission walls plus a rm -rf denial and ran out of turns (harness limitation, not a proven content failure).
Headline verdict: warn. The two foundational quests (Fundamentals 83, Data Modeling 86) are genuinely solid and verified end-to-end against a live Postgres 16. The two warns are earned by concrete, reproducible defects a beginner will hit: SQL Mastery over-promises (RIGHT JOIN and Window Functions are stated objectives never taught; its Intermediate Challenge demands "three relations" from a two-table schema), and Database Security ships two snippets that fail as literally written (a secrets table that is never created, and a psycopg2 API that does not exist). The most valuable cross-quest finding is a shared Docker-setup bug that recurs in four of the five quests β and which the fifth quest (Migrations) already demonstrates the fix for.
πΊοΈ The Journey¶
| # | Verdict | Quest | Score | One-line takeaway |
|---|---|---|---|---|
| 1 | β pass | Database Fundamentals: The Relational Model and ACID | 83 | Every SQL snippet (incl. the intentional FK-violation and ROLLBACK demo) ran verbatim; only defect is the Docker-path database never being created. |
| 2 | β pass | Data Modeling: Schema Design and Database Relationships | 86 | ER β normalization β 4-table schema verified live, composite-key uniqueness confirmed; loses points for an untaught "surrogate vs natural keys" objective. |
| 3 | β οΈ warn | SQL Mastery: Query Language Proficiency | 71 | Teaching content is excellent and all 7 queries reproduce documented output β but RIGHT JOIN + Window Functions are promised and never delivered, and a challenge references a nonexistent third table. |
| 4 | β no verdict | Database Migrations: Schema Evolution and Version Control | β | Engine exhausted its turns against sudo/docker permission denials before scoring; reasoned-only below. Biggest toolchain jump in the slice (Alembic/pip/Flyway). |
| 5 | β οΈ warn | Database Security: Access Control and Data Encryption | 74 | Core security claims held up under live testing, but two snippets fail as written (secrets table never created; conn.execute isn't a psycopg2 method) and RLS is checklisted yet untaught. |
π¬ Evidence¶
All outcomes below are from the sealed walk-evidence.json β commands the execute engine actually ran in its disposable sandbox against a real PostgreSQL 16 server (verbatim quotes trimmed). I did not re-run the engine.
1. Database Fundamentals β 83 (pass) Β· ran 6/9 runnable snippets (6 passed, 0 failed, 2 skipped, 2 reasoned)¶
CREATE TABLE members/ INSERT / SELECT βpassed: "produced the same 2-row, 4-column result shape as the documented sample output."- FK violation (Chapter 2) β
passed: second insert "failed with 'ERROR: insert or update on table "loans" violates foreign key constraint "loans_member_id_fkey"' β matches the quest's quoted error text exactly." - BEGIN/UPDATE/UPDATE/COMMIT transfer β
passed: "final balances were 50 and 150 as the narrative describes, correctly demonstrating atomicity." - Chapter 4 3NF tables + Intermediate Challenge β
passed: "\dt showed all four required tables β¦ FK-violating insert inside BEGIN/ROLLBACK leaves loans_3nf count unchanged at 2." - Docker path β
passedbut flagged: "no database named 'datakeep' is ever created β psql connects to the default 'postgres' database." - macOS / Windows / Linux install blocks β
reasoned/skipped(no macOS/Windows in a Linux sandbox;sudoblocked). Equivalent Postgres 16 behavior reproduced without sudo.
2. Data Modeling β 86 (pass) Β· ran ⅖ runnable snippets (2 passed, 0 failed, 3 skipped, 3 reasoned)¶
- 4-table schema (departments/courses/students/enrolments) β
passed: "All 4 CREATE TABLE statements succeeded β¦ ran the 4-table JOIN (matches Intermediate Challenge's validation) and got correct output." - Composite PK uniqueness β
passed: duplicate(student_id=1, course_id=1)insert "failed withduplicate key value violates unique constraint "enrolments_pkey"," confirming the quest's claim. - Docker path β
passed(-iused because the sandbox shell has no TTY β a sandbox artifact, not a quest bug). - Install blocks + text/ER diagrams β
skipped/reasoned(OS-specific or illustrative, non-executable).
3. SQL Mastery β 71 (warn) Β· ran 7/11 runnable snippets (7 passed, 0 failed, 4 skipped)¶
- Seed schema β
passed: "CREATE TABLE, CREATE TABLE, INSERT 0 4, INSERT 0 5 β no errors." - SELECT/WHERE/ORDER BY β
passed: returned "Aria/Rivenhold and Cora/Rivenhold, exactly matching the documented expected output." - INNER vs LEFT JOIN β
passed: "INNER JOIN returned 5 rows, no Dorn. LEFT JOIN returned 6 rows including Dorn with NULL total." - GROUP BY / HAVING aggregation β
passed: "Aria 2/200.00, Bram 1/200.00, Cora 2/100.00 β exact match to documented table." - Subquery + VIEW + INDEX + transaction (currval) β all
passed. - Not run: the four platform-setup snippets (
skippedβ OS-specific or sudo-blocked).
4. Database Migrations β no verdict (engine error) Β· 0 snippets scored¶
- Engine terminated with
claude exited 1 β¦ "terminal_reason":"max_turns" β¦ "errors":["Reached maximum number of turns (40)"]. - Two
permission_denialsrecorded:sudo systemctl start postgresql β¦and adocker ps -a; rm -rf β¦/test_concurrent.py. These are the sandbox's safety layer doing its job; the engine burned its 40 turns working around them and never emitted a scored verdict. - No
passed/failedevidence exists for this quest. Everything I say about it below isreasonedfrom reading the source only.
5. Database Security β 74 (warn) Β· ran 4/8 runnable snippets (2 passed, 2 failed, 3 skipped, 1 reasoned)¶
- Least-privilege role (Chapter 1) β
passed:SET ROLE app_login; DROP TABLE orders;β "ERROR: must be owner of table orders"; app_login could INSERT (sequence grant works) butDELETEβ "ERROR: permission denied for table orders" β exactly the Novice Challenge validation. - Injection concept β
passed: with corrected cursor code, malicious' OR '1'='1"returned every row β¦ the parameterized version returned[]." - Python "safe" snippet as written β
failed: "conn.execute(sql, (name,))raisesAttributeError: 'psycopg2.extensions.connection' object has no attribute 'execute'." - pgcrypto block as written β
failed: "both the INSERT and SELECT fail withERROR: relation "secrets" does not exist" (noCREATE TABLE secretsprecedes it). Round-trip works only after the table is added manually. - TLS
sslmode=verify-fullβreasoned: valid libpq syntax; only failure was DNS of the placeholder host, as expected.
π Issues Found¶
Every item cites a command the engine actually ran (tested) or an exact line I read in the source (reasoned). This is not an empty result β there are two high-severity, reproducible content bugs.
HIGH
-
testedΒ· SQL Mastery Β· Chapter 2 / Primary Objectives & Knowledge Check β RIGHT JOIN is promised ("Combine tables withINNER,LEFT, andRIGHTjoins", line 99) and quizzed ("When would you reach for aRIGHT JOINβ¦?", line 283) but never demonstrated with code; only INNER/LEFT appear. Window Functions (line 106) is a bonus objective with a dedicated resource link yet has zero content. Fix: add a worked RIGHT JOIN and a shortRANK()/SUM() OVERexample over the existing customers/orders schema, or rewrite the objectives to only claim what is taught. -
testedΒ· Database Security Β· Chapter 3 pgcrypto block (lines 293β297) & Chapter 2 Python (lines 246β257) β Both fail as literally written. The pgcrypto INSERT/SELECT hitrelation "secrets" does not exist(noCREATE TABLE secretsprecedes them, unlike Chapter 1 which sets uporders); the "safe" example callsconn.execute(...), which psycopg2 connections do not have (AttributeError) even though the prose names psycopg. Fix: addCREATE TABLE secrets (label TEXT, payload BYTEA);before the INSERT, and change tocur = conn.cursor(); cur.execute(sql, (name,)); return cur.fetchall().
MEDIUM
-
testedΒ· SQL Mastery Β· Intermediate Challenge (line 390) β "Join all three relations andGROUP BY city" is impossible: the seeded schema (lines 195β214) defines onlycustomersandorders. This also contradicts the quest's own frontmatter (completion_requirements: A multi-table query joining at least three tables, and theskill_demonstrationjoin-three-tables criterion). Fix: reword to "Join customers and orders" (revenue per city needs only those two), or add a third table. -
tested(1)/reasoned(3) Β· Shared Docker-setup bug Β· Fundamentals, SQL Mastery, Database Security (and latent in Data Modeling) β Each Docker path names the container after the intended database but never creates that database, sodocker exec β¦ psql -U postgreslands the learner in the defaultpostgresDB, diverging from the macOS/Windows/Linux paths and from later "in yourdatakeep/query_codex/warded_vaultdatabase" references. Confirmed live for Fundamentals (\lshowed only postgres/template0/template1); read in the source for SQL Mastery (line 184) and Security (line 184). Fix: mirror what Database Migrations already does correctly βdocker run β¦ -e POSTGRES_DB=<name> β¦(line 189 of database-migrations.md) β across the other four quests, or add an explicitcreatedb. -
reasonedΒ· Data Modeling Β· Secondary Objectives (line 106) β "Surrogate vs Natural Keys" is listed but never discussed; every table silently uses aSERIALsurrogate with no trade-off explanation. Fix: add a short callout on why SERIAL over a natural key (e.g. email) and when a natural key wins. -
reasonedΒ· Database Security Β· Secondary Objectives (line 106) β "Row-Level Security" is checklisted but never mentioned; noCREATE POLICY/ENABLE ROW LEVEL SECURITYexample exists. Fix: add a short RLS example onorders, or drop the objective.
LOW
-
reasonedΒ· Database Fundamentals Β· macOS path (lines 146β154) βpostgresql@16is a keg-only Homebrew formula, socreatedb/psqlmay not be onPATHwithoutbrew link/a PATH export. The Windows section warns "adjust the path to psql if needed" (line 167); macOS has the same class of issue and no warning. -
reasonedΒ· SQL Mastery & Data Modeling Β· Windows paths β Unqualifiedcreatedb query_codex/createdb modeling_realmtypically fail on a fresh winget/EDB install that only provisions a password-authedpostgresrole; a beginner may need-U postgres. -
reasonedΒ· Database Migrations Β· Chapter 2 Alembic example (lines 266β274) βop.add_column('orders', β¦)assumes anorderstable, but the quest'sliving_schemaonly ever createsusers(V1, line 214). A learner running the example verbatim hits "table orders does not exist." Fix: either seed anorderstable or targetusersfor consistency. (Not executed β engine errored before scoring this quest.) -
reasonedΒ· Database Fundamentals Β· Chapter 3 ACID table (line 303) β the Isolation row ("Two librarians issuing loans don't reuse a loan_id") conflates isolation with uniqueness/sequence generation; a concurrency example (two transfers not seeing each other's uncommitted balances) would be cleaner for a beginner.
π Chain Continuity¶
Read in plan order, carrying each quest's state into the next:
-
Dependency graph is sound and matches the frontmatter. Fundamentals has no prereqs and unlocks the rest; Data Modeling requires Fundamentals; SQL Mastery requires Fundamentals (recommends Data Modeling); Security requires Fundamentals (recommends SQL Mastery); Migrations requires Data Modeling (recommends SQL Mastery). A Data Scientist walking 1β2β3β5 never meets a step whose prerequisite the slice didn't already provide. The
unlocks_questsand[[wiki-link]]graphs are internally consistent. -
Concept hand-offs are deliberate and well-sequenced. Fundamentals Ch4 teaches 1NFβ3NF; Data Modeling Ch3 opens with "You met it briefly in Database Fundamentals; here you apply it as a modeling step" (line 289) β an explicit, correct callback. Keys/FKs from Fundamentals Ch2 are the exact prerequisite SQL Mastery's JOIN chapter leans on. The pedagogical arc holds.
-
Each quest is a fresh, self-contained environment β by design, but worth naming. Every quest spins up a different database (
datakeepβmodeling_realmβquery_codexβliving_schemaβwarded_vault) and re-seeds its own schema, so no data carries across quests. That is good for isolation and lets a learner start anywhere, but it means the "members/loans" schema built in Fundamentals is never reused β SQL Mastery introduces a brand-new customers/orders world. No continuity break, just a note that the arc is a set of parallel sandboxes, not one growing database. -
The one true cross-quest defect is the Docker setup pattern (Issue #4). Four quests share the "container named X, database X never created" bug, and the fifth (Migrations) is the only one that does it right (
-e POSTGRES_DB=living_schema). A learner who chose the Docker path in Fundamentals and hit the mismatch would carry that confusion through SQL Mastery and Security too β so fixing it once, consistently, pays off across the whole slice. -
The difficulty/tooling cliff is at Migrations. Quests 1β3 and 5 need only Postgres +
psql(and psycopg2 for one Security snippet). Migrations abruptly demandspip,alembic,psycopg2-binary, optionally Docker'd Flyway, plus Git familiarity β a much heavier lift. Credit where due: the Linux path correctly handles PEP 668 with a venv (lines 174β177) and the Flyway--add-host=host.docker.internal:host-gatewaynote (line 193) is thoughtful. But this is exactly the spot the execute engine also stalled (sudo/docker walls), which mirrors where a real beginner on a locked-down machine would get stuck. This quest deserves its own dedicated re-walk once the harness can grant it a working Postgres + tool sandbox.
π§ Reasoning & Method¶
- Mode:
executeβ the sealed evidence (walk-evidence.json) was pre-computed by the workflow's deterministic engine step against a real PostgreSQL 16 in a disposable sandbox. I consumed it as-is and did not (and cannot) re-run the engine from my Bash tool, per the skill and the auth constraint. I did not editwalk-plan.jsonorwalk-evidence.*. - What is
tested: everypassed/failedin Β§4 Evidence and Issues #1, #2, #3, and the Fundamentals half of #4 come from commands the engine actually ran (quoted, trimmed). Two real failures were observed in Database Security. - What is
reasoned: everything about Database Migrations (the engine errored out before scoring β no machine verdict exists), plus the OS-specific install paths (no macOS/Windows and nosudoin a Linux sandbox), the Windows-auth and Homebrew-PATH notes, the Docker-bug for SQL Mastery/Security (read in source, only Fundamentals was executed), and Issues #5β#10. These are labeled inline and are not counted as pass/fail. - Coverage I capped or could not reach: This is window 1 of 2 β 5 of the level's 8 quests. The remaining three (Query Optimization, Backup & Recovery, Connection Pooling) were not in my plan and were not walked; the ledger sweeps them in a later run. Within the window, one quest (Migrations) has no scored evidence. Snippet coverage per quest is stated in Β§4 (e.g. Fundamentals 6/9, SQL Mastery 7/11, Security 4/8); platform-install snippets are consistently
skippedbecause the sandbox is a single non-sudo Linux host. - Confidence: High on the two pass quests and on the four evidenced defects (Issues #1β#4 partial) β they were reproduced against a live server. Medium on the source-only reasoned issues. Low/none on Database Migrations' runtime behavior, which was never scored; treat its verdict as unknown, not passing.
- Session verdict = warn, driven by two earned warns and one unscored quest β not by any pass being downgraded. No quest content was modified; this report is my only write. Handing off to the caller for git.