InterviewStack.io LogoInterviewStack.io

Data Model Design and Access Patterns Questions

Discuss how you'd design data models based on access patterns. Understand relational vs. NoSQL trade-offs. Know when to denormalize, how to handle distributed transactions, and strategies for scaling databases (sharding, partitioning). Discuss read vs. write optimization.

HardTechnical
32 practiced
Join-heavy analytical queries across partitioned tables are causing expensive cross-partition joins. Propose data model and operational changes such as co-partitioning (colocated joins), denormalization, precomputed join tables or materialized pre-joins, and query rewrites. Discuss how each approach affects write complexity, storage requirements, and latency.
MediumTechnical
54 practiced
Given query patterns such as WHERE user_id = ? AND status = ? ORDER BY created_at DESC LIMIT 50, and also queries that filter only by status, recommend composite and covering indexes that support both efficiently. Explain how index column ordering and selectivity impact index choice and performance.
HardSystem Design
38 practiced
Architect a solution for a mixed OLTP/OLAP workload where OLTP must remain low-latency and analytics should be near-real-time. Compare the architectures: HTAP database, change-data-capture into analytic store, and streaming aggregations. For each option, discuss data modeling, storage formats, latency, and the implications for consistency and write amplification.
HardTechnical
57 practiced
You need to reduce storage costs for an analytics platform storing petabytes of data. Propose a tiered storage architecture that transparently moves cold data to object storage while keeping hot indexes or metadata in the DB. Discuss how pointers to external blobs are modeled, impact on joins and query planning, and the latency trade-offs when rehydrating cold data.
MediumTechnical
38 practiced
Explain polyglot persistence and when it makes sense to use multiple specialized databases (relational + document + graph) within a single product. Provide an example architecture for an ecommerce platform that uses each type, and describe patterns to keep data consistent across different stores (CDC, event bus, best-effort eventual consistency).

Unlock Full Question Bank

Get access to hundreds of Data Model Design and Access Patterns interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.