Design a movie review database like imdb
PremiumDatabase designEasy
- Many to many
- Pre aggregation
- Weighted rating
Quick answer
This database design interview question asks you to design a movie review database like imdb. Aim for a design that stores data correctly and serves its main queries well, then explain the schema, keys, indexes and trade-offs. Interviewers want to see how you model entities, choose keys and design for the real access patterns.
The problem
Design the database for a movie and TV review site like IMDb. Titles and people have pages with cast and crew credits; signed-in users rate titles from 1 to 10, write reviews, vote reviews helpful and keep a watchlist. The hard parts are fast pre-aggregated ratings and a Top 250 chart.
Every movie, series and episode has a page with its cast and crew, genres, an average user rating and written reviews. Every actor, director and writer has a page listing their work. The Top 250 chart ranks the best-rated movies.
What must a movie review database like imdb do?
- Title page: Show a title with genres, the top 15 billed cast with character names, key crew, the average rating, the vote count, the rating distribution (1–10) and the 3 most helpful reviews.
- Rate: A user rates a title from 1 to 10 and can change or remove the rating; one rating per user per title.
How well must it do it?
- Read-heavy: Reads outnumber writes about 100 to 1.
- Fairness: One account cannot vote twice for the same title or review.
What scale should you design for?
Use these numbers in your estimates.
The scale numbers unlock with this questionUnlock
Key concepts
- Many to many
- Pre aggregation
- Weighted rating
- Unique constraints
- Read heavy
- Cast and crew
How you’ll practise
- Access patterns
- Entities
- Schema
- Indexes and queries
- Scale and consistency
- Wrap-up
Lala, personalized to you, gives a hint when you ask and reviews your design when you are ready.
What do interviewers look for?
In any database design round.
- Lists the entities and how they relate before writing tables
- Designs the schema around the main access patterns
- Chooses primary keys, foreign keys and indexes with reasons
- Explains where to normalise and where to denormalise
- Considers integrity, transactions and concurrent writes
- Plans for growth: partitioning, archiving and migrations
Questions people ask about this interview question
- Which design type is this question?
- It is a database design question. You design a movie review database like imdb and explain your choices the way you would in an interview.
- Is this question asked at entry level?
- It is marked Easy, so it suits engineers who are new to database design interviews. It is also a good warm-up before harder questions.
- What should I cover first?
- Start with the entities and the main queries the database must answer. Agree on scope with the interviewer before you design anything.
- Can I practise it for free?
- It is a premium question. Sign up and unlock it once for 10 credits; it then stays unlocked. When you finish, Lala, your personalized AI mentor, can review your design for 30 credits.
Related questions
Updated · Written by the SevyDevy team