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
60 practiced
Star schema dimensions are often denormalized for performance, but some attributes change frequently and must preserve historical values. Propose a hybrid modeling approach that keeps frequently changing attributes normalized while providing a denormalized snapshot for fast queries. Provide SQL patterns to update the snapshot and preserve SCD history.
MediumTechnical
40 practiced
You are given multiple customer records from several sources and must deduplicate and merge them into a canonical customer table. Describe a normalized schema and merge strategy (including a merge history table or mapping table) suitable for BI that preserves provenance and supports reprocessing.
EasyTechnical
44 practiced
You are reviewing a legacy 'customer' table with columns customer_name, address_line1..address_line5, phone1..phone3, and last_order_id repeated. Identify normalization problems and propose a refactored schema suitable for BI reporting and customer 360 analysis. Explain how your design reduces redundancy and simplifies queries.
EasyTechnical
37 practiced
A report currently stores tags for each article in a single comma-separated text column 'tags' (for example 'sports,local,highlights'). Explain why this violates 1NF and describe a normalized design to support efficient BI queries that need tag counts and tag-based filtering.
HardTechnical
36 practiced
You inherit a reporting system where two seemingly identical dashboards show different total revenue because one query multiplies quantity by price after joining product tables while the other sums a precomputed line_total. Given the two queries and schemas, identify likely root causes (wrong grain, join duplication, late filters) and propose schema and ETL fixes to ensure consistent metrics across dashboards.

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.