InterviewStack.io LogoInterviewStack.io

Data Modeling and Schema Design Questions

Designing relational schemas end to end: entity-relationship modeling, normal forms and deliberate denormalization, primary/foreign keys, data types, and integrity constraints, together with applied schema design driven by real business requirements and query access patterns. Covers modeling a domain from ambiguous requirements, choosing structures that serve the queries a system must run, trading normalization for correctness against denormalization for read performance, and evolving schemas as needs change. Foundational data-modeling judgment for building and reviewing databases, tested through open-ended domain-modeling prompts.

MediumTechnical
35 practiced

Explain how bitmap and B-tree indexes differ. For a large dimension table with low-cardinality columns (e.g., gender, boolean flags), which index type would you choose and why? Mention concurrency considerations.

EasySystem Design
59 practiced

Design a schema for tracking promotion redemptions per user and measuring assignment versus usage. Include tables (promotions, promotion_assignments, promotion_redemptions) and the keys and fields needed to calculate metrics like redemption rate and time-to-redemption. Explain how you'd handle one-time-use promotions and the concurrency concerns that come with them.

EasyTechnical
41 practiced

You're given the following simplified e-commerce schema:

customers(customer_id PK integer, name varchar, email varchar, created_at timestamp)
orders(order_id PK integer, customer_id integer FK -> customers(customer_id), total_amount decimal, placed_at timestamp)
order_items(order_item_id PK integer, order_id integer FK -> orders(order_id), product_id integer, quantity integer, price decimal)

Spend a minute examining the schema. List the primary keys and foreign keys, describe the relationships between the tables and their cardinality (one-to-many, many-to-one), and name which columns you would inspect first for data-quality issues and why.

EasyTechnical
36 practiced

In a read-heavy analytics system, when is denormalization appropriate? Discuss the benefits and drawbacks of denormalization (query speed, data duplication, update complexity), techniques to keep denormalized data consistent (triggers, change-data-capture, streaming updates, batch ETL), and two concrete scenarios where denormalization is preferable and two where you should maintain normalization.

EasyTechnical
38 practiced

Describe how partitioning a large fact table by date can improve query performance. What partitioning scheme would you use for a table containing 10 years of daily e-commerce transaction lines and why?

Unlock Full Question Bank

Get access to all Data Modeling and Schema Design interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.