Learn Data Modeling with Phoebe

Design the schema everything else queries

A leader track on why the schema decides every argument your team is having about numbers - grain, ownership, naming, and what a bad model actually costs - with no code to write. And a builder track that designs a real ecommerce marketplace from scratch: entities, normalization, keys, DDL, six dimensions, three fact tables, four marts, and a semantic layer an AI analyst can query accurately. Every builder page runs real SQLite in your browser, and every session ships code you keep: the DDL, the transform, the marts, the validator, the golden question set.

16sessions
2tracks
8sql files you keep
20golden questions graded
27validation checks passing

The leader track 🀝 · for C-level, heads of data & curious minds · 6 x 45 min · no code to write

Thinking mode: why every disagreement about a number is really a disagreement about grain, what a bad model costs in rework and lost trust, how to make one metric mean one thing, what to buy versus standardise, who owns a table, and why an AI analyst is only as good as the model beneath it. Each session ends with the questions to ask your data team.

The builder track πŸ› οΈ Β· for practitioners Β· 10 sessions x 45 min (b10: 60) Β· live SQLite in your browser

One running project: Bazaar, a multi-merchant ecommerce marketplace. You design its transactional schema from a flat export (b1-b4), find out why analysts cannot query it (b5), build six dimensions and three fact tables they can query (b6-b7), answer four real business questions with the result (b8), publish it so an AI agent gets the right answer (b9), and extend the whole thing to returns and refunds in the capstone (b10). Every page runs real SQLite compiled to WebAssembly - editable, offline after one 660 KB load - and every session ships files into sql/, python/ and semantic/.

πŸ—‚οΈ Builder 1 Β· easy

Bazaar's source reality

From one flat export to eight entities. The conceptual / logical / physical ladder, and the first thing wrong with the spreadsheet everyone works from.

β–Ά Builders start here
πŸ§ͺ Builder 2 Β· easy

The anomaly lab

Four levers, one wide table, real UPDATE/INSERT/DELETE probes. Turn the anomalies off one by one and derive 3NF instead of memorising it.

β˜… signature lab
πŸ”— Builder 3 Β· medium

ER, cardinality and keys

Resolve the many-to-many, pick natural versus surrogate keys, and decide what a composite key is really saying about your grain.

ER diagram
βš™οΈ Builder 4 Β· medium

Physical OLTP

Types, NOT NULL, CHECK, foreign keys and the first indexes - then ship the DDL and generate 90 days of deterministic marketplace data.

ships sql/01 + generator
🧭 Builder 5 · medium

Why analysts cannot query OLTP

Write the business question against the source schema, feel the pain, then meet grain, conformance and the two-model split that fixes it.

grain worksheet
πŸ“ Builder 6 Β· hands-on

Dimension design

Six dimensions, surrogate keys, flat-and-wide over snowflaked, no NULLs ever, and slowly-changing type 2 where history actually matters.

ships sql/10
πŸ“Š Builder 7 Β· hands-on

Fact design

Three facts, three grains: what was sold, what was paid, what was wanted. Additivity, degenerate dimensions, and why you never join two facts.

ships sql/11 + 12
πŸ” Builder 8 Β· hands-on

Answering the four questions

Which merchant dropped, why sales fell, why one day collapsed, when the peak hours are - built as marts, and one hypothesis dies on the evidence.

ships sql/20 + 30
πŸ€– Builder 9 Β· hardest

Agent-ready modeling

Schema card, metric table, data contract, golden question set - then measure it: the same agent scores 0/20 without them and 20/20 with them.

β˜… signature lab
🏁 Builder 10 · hardest · 60 min

Capstone: returns and refunds

A brand-new subject area, all the way down the ladder - entities, keys, DDL, dimension, fact, mart, agent view - and 27 validation checks green.

whole ladder, alone
easy medium hands-on hardest

What you leave with - runnable, not slideware

sql/ 01_oltp_ddl.sql 02_seed.sql 10_dim_ddl.sql 11_fact_ddl.sql 12_oltp_to_star.sql 20_marts.sql 30_business_questions.sql 40_agent_views.sql
python/ gen_bazaar_data.py build_star.py validate_model.py answer_questions.py agent_text_to_sql.py agent_query_to_text.py eval_golden_questions.py
semantic/ schema_card.md contract.yaml golden_questions.jsonl materials/ official-course-map.md

This is the prerequisite the deng bucket was missing: the schema that learn-sql-with-phoebe hands you to query is a schema somebody designed - this is where that work happens. Take it before learn-sql if you are starting fresh, or after it if you already write SQL and want to know why the tables look like that. Next along the ladder: learn-data-warehouse-with-phoebe operates the star you design here, and learn-data-engineering-with-phoebe builds the pipelines that fill it.

Built from Kimball & Ross (The Data Warehouse Toolkit), Inmon, relational-theory fundamentals, the dbt layering and model-contract conventions, and published text-to-SQL benchmark practice - full source map and honest out-of-scope list in materials/official-course-map.md.

Choose your path πŸ—ΊοΈ

Two doors, one marketplace. Leaders never write code; builders never sit through theory they have not just run themselves.

🀝 The leader path (judge & fund) a1β†’ a2β†’ a3β†’ a4β†’ a5β†’ a6
πŸ› οΈ The builder path (design Bazaar's) b1β†’ b2β†’ b3β†’ b4β†’ b5β†’ b6β†’ b7β†’ b8β†’ b9β†’ b10
πŸš€ The full journey (lead AND build) a1-a6β†’ b1-b10
⚑ The two-hour tour (if you only have one evening) b2 anomaly labβ†’ b7 fact designβ†’ b9 agent lab

The knowledge map 🧠

Both tracks at a glance - hover a session to spotlight its concepts, click any node to jump in.