Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. What is a star schema?

Data platform · Storage & Modeling

What is a star schema?

Mediumplatform-09
star schemafactsdimensionsmodeling

Question

What is a star schema in analytics modeling?

Solution

A star schema is a warehouse modeling style with a central fact table of measurable events and surrounding dimension tables that describe those events.

        dim_customer
             \
dim_date --- fct_orders --- dim_product
             /
        dim_store

Facts

  • Many rows, numeric measures (amount, quantity)
  • Foreign keys to dimensions
  • Grain statement: "one row per order" or "one row per order line"

Dimensions

  • Descriptive attributes (customer_name, product_category)
  • Used for filters and group-bys in BI

Why interviewers ask

Stars are simple for BI tools, fast for aggregates, and force you to clarify grain.

Interview tip: Always state the fact grain first. Confusing order-level and line-item-level facts is a classic modeling bug.

PreviousNext