InterviewStack.io LogoInterviewStack.io

Data Warehouse and Dimensional Modeling Questions

Design and model scalable analytical data systems using dimensional modeling principles and data warehouse architecture patterns. Core concepts include fact and dimension tables, defining and enforcing grain, surrogate keys, degenerate and role playing dimensions, conformed dimensions, and handling slowly changing dimensions including Type One, Type Two, and Type Three. Understand schema choices and trade offs such as star schema versus snowflake schema, normalization versus denormalization, and fact table types including transactional, periodic snapshot, and accumulating snapshot. Apply design decisions to meet query patterns and performance goals by considering partitioning, indexing, compression, columnar storage, and aggregation strategies. Be able to design schemas for different business domains, reason about data integration and consistency, and optimize for common analytical workloads and reporting requirements.

EasyTechnical
0 practiced
Compare a star schema and a snowflake schema. Describe the physical differences, query and maintenance trade-offs, and provide an example scenario where snowflaking a dimension (normalizing it) could be beneficial, and a scenario where a denormalized star is preferred for performance.
HardTechnical
0 practiced
You must support rollups and fast aggregation on a product category hierarchy that frequently changes. Compare adjacency-list, nested-sets, materialized path and closure-table (transitive closure) approaches for hierarchical dimensions. For each approach describe ease of updates, query simplicity for rollups, storage costs, and provide example SQL for a rollup aggregation.
MediumTechnical
0 practiced
You have order_date, ship_date and delivery_date in your business. Explain how to implement a role-playing date dimension in your star schema. Compare alternatives: create separate physical date dimensions per role (dim_order_date, dim_ship_date) vs use a single dim_date and join it multiple times with aliases. Discuss maintenance effort and BI user experience for each alternative.
HardSystem Design
0 practiced
You are tasked with migrating critical reporting from a legacy OLTP normalized schema to a new dimensional data warehouse with minimal downtime. Outline a phased migration plan including discovery and mapping, ETL/ELT development, parallel run/backfill, incremental sync, validation tests and reconciliation, cutover steps, rollback plan and stakeholder communication. Highlight checks to validate metric parity before cutover.
MediumTechnical
0 practiced
Given these tables:
orders(order_id, order_date TIMESTAMP, customer_id, total_amount)
dim_customer_scd2(customer_sk, customer_id, name, valid_from, valid_to, current_flag)
Write an efficient SQL query to join orders to the customer name that was valid at the time of the order (i.e., find the Type 2 row where order_date is between valid_from and valid_to). Use ANSI SQL or a pattern suitable for large datasets and explain optimization tips.

Unlock Full Question Bank

Get access to hundreds of Data Warehouse and Dimensional Modeling interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.