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
30 practiced

Design a dimension table for 'product' to be used in a data warehouse where products can change category and price frequently. Explain how you would handle SCD for category and price, and what columns you'd include to support effective-dated queries.

MediumSystem Design
36 practiced

Design the data model for a messaging app supporting users, conversations, and messages, optimized for these access patterns: (1) list recent conversations for a user with a last-message preview, (2) fetch messages for a conversation with pagination, and (3) handle large-scale message retention and archival. Provide both a relational and a document-store design and explain the trade-offs.

HardTechnical
30 practiced

Propose schema patterns to add auditing and change-tracking to tables for traceability. What columns and structures would you add to capture who changed a row and when, and what approach would you use for row-level history: a separate audit table, database-level change data capture, or an append-only pattern? Discuss the queryability and performance trade-offs of each history-tracking approach.

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?

MediumTechnical
54 practiced

A data pipeline writes to a warehouse where fact and dimension tables are stored in a columnar format. The team needs to support fast lookups of a small subset of rows (point selects) as well as large scans. What schema and physical design choices reduce latency for point selects without harming scan performance?

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.