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

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?

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?

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.

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.

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.