Design a real estate database like Zillow
PremiumDatabase designEasy
- Geospatial index
- Map search
- Price history
Quick answer
This database design interview question asks you to design a real estate database like Zillow. 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 real estate listings site like Zillow or 99acres. Agents publish homes for sale or rent; buyers search on a map, view photos and price history, save homes and get alerts. The hard parts are fast filtered map search, price history across listings and duplicate-free feed imports.
Buyers search on a map or by city with filters such as price, bedrooms and property type, and get an email when a new listing matches a saved search. Most listings arrive in a nightly feed from listing services; some are typed in by agents.
What must a real estate database like Zillow do?
- Search: Find active listings inside a map rectangle or a city, filtered by sale or rent, price range, minimum bedrooms and bathrooms and property type, sorted by newest or price, 40 per page.
- Listing page: Show the property, the current listing, up to 40 photos in order, the agent and brokerage, and the price history of this home across all past listings.
How well must it do it?
- Latency: Map search under 200 ms p99; listing page under 100 ms p99.
- History: Sold and withdrawn listings are kept forever so price history works.
What scale should you design for?
Use these numbers in your estimates.
The scale numbers unlock with this questionUnlock
Key concepts
- Geospatial index
- Map search
- Price history
- Composite index
- Idempotent upsert
- Saved search alerts
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 real estate database like Zillow 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