InterviewStack.io LogoInterviewStack.io

Relational Schema Design and Normalization Questions

Designing schemas for relational databases and applying normalization principles to reduce redundancy and maintain data integrity. Candidates should understand the normal forms including first normal form, second normal form, third normal form, and Boyce Codd normal form; primary keys, foreign keys, referential integrity, and how to model relationships such as one to one, one to many, and many to many using junction tables. Coverage includes entity relationship modeling, data modeling techniques, handling hierarchical or recursive data, choosing appropriate data types, and recognizing normalization violations in poorly designed schemas. Also discuss practical denormalization trade offs for performance, when and how to intentionally denormalize, designing schemas for maintainability and common query patterns, and considerations for analytics schemas such as star schemas and slowly changing dimensions.

HardTechnical
32 practiced
An analytical query performs joins across a dozen normalized tables and runs for minutes. Propose a systematic approach to optimize it: profiling to find hotspots, possible denormalization strategies, adding indexes or materialized views, rewriting the query, or changing the execution engine. For each option provide decision criteria and expected gains.
HardTechnical
64 practiced
You must migrate an existing customers table (id, email, address) to support SCD Type 2 without downtime. Provide a step-by-step migration plan including schema changes, backfill strategy, how to keep OLTP writes working during migration, cutover steps, and rollback strategy. Address correctness and performance concerns.
MediumSystem Design
43 practiced
Design a partitioning strategy for a large transactions table with 1 billion rows that is used by both OLTP operations and nightly analytics. Discuss partition key choices (date, customer_id, range/hash), partition maintenance (retention, dropping old partitions), and the impacts on foreign keys and joins.
EasyTechnical
45 practiced
Design a simple audit_log table schema to record changes to critical user profile fields: user_id, changed_by, changed_at, field_name, old_value, new_value. Specify types for each column, indexes to support queries by user_id and time range, and retention/archival strategies for large volumes of audit data.
EasyTechnical
41 practiced
Given a single table: Orders(order_id, customer_name, customer_email, item_id, item_name, qty), identify the normalization violations and list the minimal set of tables you would split this into to reach 3NF. Explain the update, insertion, and deletion anomalies that the current design allows.

Unlock Full Question Bank

Get access to hundreds of Relational Schema Design and Normalization interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.