Skip to content

Practice data modeling

See what one schema decision does to the whole pipeline.

SchemaLab is the hands-on way to build data-modeling judgment. Change one thing on the canvas and watch the SQL, the checks, and the downstream pipeline react, the exact reasoning senior data interviews probe for.

No card required · See pricing

Round
Schema design
Pressure
Judgment, not syntax
Signal
Can you defend it?

live_schema_canvas.erd

Flip one decision. Watch the SQL and the downstream pipeline react.

generated_sql.sql · regenerates from the canvas

CREATE TABLE "dim_customer" (  "customer_key" UUID NOT NULL PRIMARY KEY,  "customer_id" VARCHAR(64) NOT NULL,  "customer_segment" TEXT); CREATE TABLE "dim_product" (  "product_key" UUID NOT NULL PRIMARY KEY,  "sku" VARCHAR(64) NOT NULL); CREATE TABLE "fact_order_items" (  "order_item_key" UUID NOT NULL PRIMARY KEY,  "customer_key" UUID NOT NULL,  "product_key" UUID NOT NULL,  "net_revenue" NUMERIC NOT NULL); ALTER TABLE "fact_order_items" ADD FOREIGN KEY ("customer_key") REFERENCES "dim_customer" ("customer_key"); ALTER TABLE "fact_order_items" ADD FOREIGN KEY ("product_key") REFERENCES "dim_product" ("product_key");
History
Latest value only
Storage
1 row per customer
Query
Current state only

Valid star schema

Practice loop

The canvas is the source of truth.

SchemaLab teaches causality in structures. Change the schema and the downstream readings change with it.

Model the grain

Start where interviewers start: what one row means, which dimensions explain it, and where history belongs.

Read the instrument

The ERD drives generated SQL, lifecycle readings, storage trade-offs, and deterministic checks from one state.

Defend the trade-off

Layer 3 reviews judgment after the deterministic checks, so feedback stays grounded in the model you built.

  1. 1. ERD

    fact_order_items -> dimensions

    Foreign-key direction stays visible on the canvas.

  2. 2. SQL

    regenerates from state

    Postgres output follows the model, not a separate editor.

  3. 3. Checks

    keys, grain, history

    Layer 1 and 2 are deterministic instrument readings.

  4. 4. Readiness

    evidence over guesswork

    Progress is tied to solved concepts and verdict history.

Challenge previews

Real problem sets, not trivia.

Start with constrained decisions, move into schema builds, then take open scenarios where the answer is a defensible model.

Browse all
Quick Decisionbeginner5 min

Pick an SCD pattern

Pick the dimension strategy that preserves historical product prices for downstream revenue analysis.

Success signal

Commit to a decision, then compare the reasoning.

Preview challenge
Concept Challengeintermediate20 min

Price history with SCD2

Extend a starter fact table with a dimension that supports accurate historical price analysis.

Success signal

Build the model before opening any authored approach.

Preview challenge
Concept Challengeintermediate20 min

Campaign enrollment bridge

Resolve a subscriber-to-campaign many-to-many relationship without losing enrollment detail.

Success signal

Build the model before opening any authored approach.

Preview challenge

Starter concept coverage

Ten concepts that become visible on the canvas.

Primary Keys

Learners identify stable row identity and mark the correct column or column set as the primary key.

Foreign Keys

Learners connect entities through explicit referenced keys instead of informal naming conventions.

Relationship Cardinality

Learners show the expected one-to-one, one-to-many, or many-to-many shape for a given business relationship.

Many-to-Many Modeling

Learners recognize when a direct relationship needs an associative structure rather than a naive single FK.

Normalization

Learners restructure tables so each fact is stored once, and judge when denormalization is the right trade.

Fact vs Dimension Roles

Learners separate measurable events from descriptive context instead of collapsing everything into one table.

Fact Table Grain

Learners make the row-level meaning of a fact table explicit before adding measures and relationships.

Surrogate Keys

Learners use synthetic identifiers where versioned dimensional history or stable warehouse joins require them.

Degenerate Dimensions

Learners keep transaction-level identifiers on the fact when a separate dimension adds no analytical value.

Slowly changing dimensions: Type 2

Learners preserve historical dimensional states by versioning rows rather than overwriting them.

Get started

Practice free. Go Pro when you are serious.

The free tier runs the whole loop. Pro lifts the daily limits and unlocks full mock interviews and the in-workspace tutor. Cancel anytime.