Skip to content
tezvyn:
Menu

How would you design a data model for a feature adoption dashboard?

Source: Wikipedia: Dimensional modelingMediumHow cards are made

Tests applying dimensional modeling to a business need. A good answer defines a central fact table (e.g., feature_usage) and related dimensions (user, feature, date). A red flag is designing a transactional model or being too vague about the schema.

What's really being asked

Your practical ability to apply dimensional modeling (like the Kimball approach) to a common business problem. It's not about reciting definitions. The interviewer wants to see if you can translate "feature adoption" into a concrete, queryable star schema, identifying the core facts and the contextual dimensions needed for analysis.

The full answer

Four key points in order. First, identify the business process, which is a user interacting with a feature. Second, define the central fact table based on this event; its grain should be "one row per feature interaction per user". This table, fact_feature_usage, will contain foreign keys and numeric measures (like an interaction count, which is usually just 1). Third, define the necessary dimension tables that provide context, such as dim_user, dim_feature, dim_date, and potentially dim_organization for B2B products. Fourth, explain how these tables form a star schema, with the fact table at the center, optimized for fast aggregations required by a dashboard.

The mistakes people make

The most common mistake is designing a transactional (OLTP) model instead of an analytical (OLAP) one. This often looks like a highly normalized schema with many joins, which is slow for aggregations. Another red flag is a vague answer like "I'd use a star schema" without specifying the tables, columns, and grain. Putting descriptive attributes (like user_email or feature_name) directly into the fact table is also incorrect, as it bloats the table and misses the benefits of the star schema. Finally, forgetting to include a dedicated dim_date table is a frequent omission; it's critical for any time-based analysis.

What usually comes next

Be ready for "How would you handle a user changing their subscription plan?" which tests knowledge of Slowly Changing Dimensions (SCDs, typically Type 2 for history). Another is "How would you calculate weekly active users for a feature?" which tests your understanding of querying the model (COUNT(DISTINCT user_key) grouped by week). For scale, expect "How would this handle 100 million events per day?" The answer involves partitioning the fact table by date and using columnar storage formats like Parquet.

A concrete example

The fact table would be fact_feature_usage with columns: feature_key (FK), user_key (FK), date_key (FK), organization_key (FK), and interaction_count (metric, value is 1). It would be joined to dimensions like dim_feature (feature_key, feature_name, category), dim_user (user_key, user_id, plan_type, signup_date), and dim_date (date_key, full_date, day_of_week, is_weekend).

Interview question

What is the primary advantage of using a star schema over a highly normalized transactional model for a feature adoption dashboard?

  • a.It simplifies complex analytical queries and improves aggregation performance.Correct
  • b.It ensures strict data consistency for individual record updates and inserts.
  • c.It allows for easier integration with operational systems for real-time data processing.
  • d.It minimizes data redundancy by storing attributes in a single location.
Why?

The card states that a star schema is "optimized for fast aggregations required by a dashboard," directly aligning with option A. Highly normalized transactional models (OLTP) are slow for aggregations, while star schemas (OLAP) are designed for analytical performance. Options A, B, and D describe benefits typically associated with OLTP systems or other system characteristics, not the core advantage of a star schema for analytical reporting.

Just read this? Test yourself on what you have been reading.

Read the original → en.wikipedia.org

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on data modeling — each one lists the topics its interview covers.

See open roles