Dimensional Modeling and Star Schema Concepts Questions
Understand fact and dimension tables, surrogate keys, and slowly changing dimensions. Be able to write queries that efficiently query dimensional data structures. Understand grain of fact tables and how to aggregate appropriately.
HardSystem Design
27 practiced
Design a real-time enrichment layer to attach slowly changing dimension attributes (e.g., user tier, experiment bucket) to streaming events before landing them into a facts store for near-real-time analytics. Discuss cache design (read-through vs write-through), TTL and stale data handling, consistency guarantees, fallback behavior if enrichment fails, and how to persist enriched vs raw events.
HardSystem Design
25 practiced
Architect a multi-region retail data warehouse to support both near-real-time dashboards for local store managers (latency < 5 minutes) and heavy historical analytics for global business teams. Include: star schema guidelines (fact grain choices), replication and data locality strategies, CDC for source systems, handling SCDs across regions, partitioning/sharding, and choices for data storage engines. Discuss consistency/latency trade-offs and cost considerations.
EasyTechnical
19 practiced
Describe surrogate keys and natural keys in the context of dimensional modeling. Explain why BI solutions often prefer surrogate keys for dimension tables. Provide at least three reasons and one scenario where using the natural key is acceptable.
HardTechnical
35 practiced
A product attribute historically lived in product_dim but now logically belongs in supplier_dim after an organizational change. You must refactor the dimensional model without losing history and while keeping facts joinable. Describe migration steps to move the attribute, preserve historical correctness, update existing SCD2 rows, and ensure existing reports don't break during transition. Include a rollback plan.
MediumTechnical
26 practiced
Given a staging table source_customers and a customer_dim SCD2 table, write SQL that detects which source rows need a new SCD2 insertion because one or more tracked attributes changed. Schemas:Return the source rows that require inserts and the columns that changed. Use SQL techniques suitable for large tables.
sql
source_customers(customer_id int, email text, name text, updated_at timestamp)
customer_dim(surrogate_id int, customer_id int, email text, name text, effective_from timestamp, effective_to timestamp, is_current boolean)Unlock Full Question Bank
Get access to hundreds of Dimensional Modeling and Star Schema Concepts interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.