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.

EasyTechnical
29 practiced

Design a relational schema for a university course-enrollment system where students can enroll in many courses and courses can have many students. Each enrollment must record an enrollment_date and a grade. Describe the tables (an ERD in words) and the key columns, including a uniqueness constraint to prevent duplicate enrollments, and describe indexes you'd add for scale (assume roughly 10 million enrollments).

EasyTechnical
36 practiced

What are the primary components of an entity-relationship (ER) model? Describe entities, attributes, relationships, cardinality, and weak entities, and explain how an ER diagram maps to a normalized relational schema.

MediumSystem Design
28 practiced

Design a schema for an inventory-management system that tracks products across multiple warehouses. Entities should include products, warehouses, stock_levels, and stock_transactions (inbound, outbound, reservation). Describe the tables, keys, and constraints. Explain how you would ensure stock consistency under concurrent updates (for example two orders reserving the same quantity) and suggest scalable concurrency-control strategies.

HardTechnical
43 practiced

A BI team reports that joins between a large fact table and a high-cardinality dimension table are causing memory pressure on the analytic cluster. Propose schema-level and engine-level mitigations to reduce memory usage for large joins.

EasyTechnical
30 practiced

Describe how to model one-to-one, one-to-many, and many-to-many relationships in a relational schema. Provide example table shapes (table names, key columns) for each relationship and explain how to enforce cardinality and referential integrity. Cover optional versus mandatory relationships and how you would enforce them in SQL.

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.