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.

HardTechnical
32 practiced

You inherit a reporting system where two seemingly identical dashboards show different total revenue: one query multiplies quantity by price after joining product tables, while the other sums a precomputed line_total. Given the two queries and schemas, identify the likely root causes (wrong grain, join duplication, a late filter) and propose schema and ETL fixes to make the metrics consistent across dashboards.

MediumSystem Design
52 practiced

Design a schema to store customer addresses that supports: a current-address lookup, a historical audit of changes with timestamps, queries like 'what was the address at time T', and efficient deletion and retention. Propose the table(s), primary keys, and indexing strategy, and explain the trade-offs related to storage and query cost.

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.

EasyTechnical
37 practiced

Describe partitioning and its benefits for very large tables used in analytics. Explain range, hash, and list partitioning in simple terms and when each is useful. What maintenance operations must you consider for partitioned tables?

EasyTechnical
29 practiced

Describe the main differences between OLTP and OLAP systems and how schema design changes for each. Using an e-commerce orders domain, explain how you would design the transactional (OLTP) schema and how you'd design the analytical (OLAP) schema. Discuss normalization, indexing, ETL/ELT patterns, query-latency expectations, and typical query types.

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.