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
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?

MediumTechnical
36 practiced

For an on-demand food-delivery platform, list the primary entities and relationships for a conceptual data model that supports ordering and delivery. Include entities such as Orders, Customers, Restaurants, Menus, MenuItems, Drivers, Deliveries, Payments, Addresses, Promotions, and Logs. For each entity, list 5-8 core attributes and specify the cardinalities (one-to-many, many-to-many) between key entities. State your assumptions about timestamps, soft deletes, and versioning needed for the business logic.

HardTechnical
50 practiced

You inherit a reporting schema where many dimension tables have nullable surrogate foreign keys to a central 'master' table. Query performance suffers from many LEFT JOINs producing repeated nulls. Propose schema and query-level optimizations to reduce join cost and simplify reporting queries.

MediumTechnical
29 practiced

A stakeholder insists on using a relational database for social-graph queries (friends-of-friends, shortest path) but you believe a graph database is a better fit. How would you explain the data-model and access-pattern differences, propose a phased migration (or hybrid approach) to prove value, and minimize disruption to existing services?

EasyTechnical
40 practiced

Explain the difference between a PRIMARY KEY and a UNIQUE constraint in a relational database. Cover purpose, nullability, index behavior, referencing by foreign keys, and typical usage patterns. Give examples showing (a) a primary key on a single column, (b) a unique constraint on a nullable column, and (c) creating a unique index manually. Discuss practical choices such as composite keys and partial unique indexes.

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.