Dimensional Modeling and Schema Design Questions
Designing analytical schemas: star and snowflake schemas, fact and dimension tables, grain selection, slowly changing dimensions, and normalization vs denormalization for analytics. Covers modeling business requirements into queryable structures and schema design for large datasets. The data-modeling backbone of BI and warehouse work.
Define additive, semi-additive, and non-additive measures, and give one business example of each. For each type, explain how it should or should not be aggregated so a dashboard does not silently show a misleading total.
Design an analytics data model for an e-commerce company processing 1 million transactions a day that needs near-real-time dashboards for orders, revenue, inventory, and product performance. Name the fact and dimension tables (with key columns), your SCD handling for the changing dimensions, and how you would get data in near-real-time (CDC versus streaming). State any technology assumptions you make.
Design a star schema for a media/content-streaming analytics use case that must support fast dashboard queries: define the fact table(s), dimensions, surrogate keys, and the grain. Then write example SQL that computes the weekly new-subscriber lift attributable to a specific title using joins between the fact and dimension tables.
You are designing a data model for product analytics tracking user behavior events (page_view, click, purchase). Explain whether you would use a raw event-level fact table, a daily-aggregated fact table, or both, and justify the choice against the query patterns you need to support: funnels, retention, and cohort analysis.
You need a star schema where the natural facts occur at two different grains at once, for example session-level and event-level activity. Describe your options for modeling this (separate fact tables at each grain, a single consolidated multi-grain fact table with nulls for the coarser grain's extra columns, or an event table with derived aggregates), and explain how you would support cross-grain analysis without double counting.
Unlock Full Question Bank
Get access to all Dimensional Modeling and Schema Design interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.