Design an Online Bookstore: Catalog, Search, Inventory and Orders

Read the full interview experience this question came from →

Quick Overview

A system design question asking for an online bookstore: catalog browsing and search, availability, carts, orders and payments. It tests scoping an open prompt, data modeling, preventing overselling under concurrent purchases, reliable checkout flows and scaling read-heavy traffic.

Design an Online Bookstore: Catalog, Search, Inventory and Orders

Company: Databricks

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Onsite

Design a bookstore. The report gives only this short prompt for the architecture round, so settle the scope with the interviewer first. In its usual form this is an online bookstore: customers browse and search a catalog of books, see prices and availability, add books to a cart, place orders and pay, while the store manages its catalog and inventory so that it does not sell copies it does not have. ```hint The scarce resource is stock Decide where the count of available copies lives, and how two customers who try to buy the last copy at the same moment are kept from both succeeding. ``` ```hint Browsing and buying are different paths Customers look at books far more often than they buy them. Consider which data each path needs and whether both must be served from the same store with the same consistency. ``` ### Constraints and Clarifications - Not given: catalog size, traffic, physical books or e-books, the number of warehouses, payment methods, and whether the round wants APIs and a data model or a full architecture in depth. Ask, or state assumptions. ### Clarifying Questions - Who uses the system: customers only, or also staff who manage the catalog, prices and stock? Are there third-party sellers? - Are the books physical and shipped from warehouses, digital, or both? - Is stock tracked in one place or per warehouse, and are preorders or backorders allowed? - What search is expected: lookup by title, author or ISBN, full-text search, filters by genre and price, recommendations? - How large is the catalog, and how many page views and orders per second are expected at peak, including a popular new release? - Should the design focus on the APIs and data model, or on the full architecture including scaling and failure handling? ### What a Strong Answer Covers - Scopes the problem and states functional and non-functional requirements with rough estimates - A data model for books, inventory, carts, orders and payments, and the APIs on top of it - Correct inventory handling under concurrent purchases, with reservation, expiry and release - A checkout and payment flow that survives retries, duplicate requests and partial failures - A read path for browsing and search (caching, a search index) and how it stays fresh - Scaling, failure handling and monitoring ### Follow-up Questions - A popular new release goes on sale and thousands of customers try to buy the last few hundred copies at once. What happens? - The payment succeeds but the order service crashes before recording it. How does the system recover? - How do price changes reach search results and carts, and what does a customer pay if the price changes during checkout? - Add several warehouses. How do you choose which one fulfils an order?

Overview: A system design question asking for an online bookstore: catalog browsing and search, availability, carts, orders and payments. It tests scoping an open prompt, data modeling, preventing overselling under concurrent purchases, reliable checkout flows and scaling read-heavy traffic.

Read the full Databricks Software Engineer interview experience this question came from

Databricks logo
Databricks
Oct 14, 2026
mediumSoftware EngineerOnsiteSystem Design
1
0

Design a bookstore. The report gives only this short prompt for the architecture round, so settle the scope with the interviewer first. In its usual form this is an online bookstore: customers browse and search a catalog of books, see prices and availability, add books to a cart, place orders and pay, while the store manages its catalog and inventory so that it does not sell copies it does not have.

Constraints and Clarifications

  • Not given: catalog size, traffic, physical books or e-books, the number of warehouses, payment methods, and whether the round wants APIs and a data model or a full architecture in depth. Ask, or state assumptions.

Clarifying Questions Guidance

  • Who uses the system: customers only, or also staff who manage the catalog, prices and stock? Are there third-party sellers?
  • Are the books physical and shipped from warehouses, digital, or both?
  • Is stock tracked in one place or per warehouse, and are preorders or backorders allowed?
  • What search is expected: lookup by title, author or ISBN, full-text search, filters by genre and price, recommendations?
  • How large is the catalog, and how many page views and orders per second are expected at peak, including a popular new release?
  • Should the design focus on the APIs and data model, or on the full architecture including scaling and failure handling?

What a Strong Answer Covers Guidance

  • Scopes the problem and states functional and non-functional requirements with rough estimates
  • A data model for books, inventory, carts, orders and payments, and the APIs on top of it
  • Correct inventory handling under concurrent purchases, with reservation, expiry and release
  • A checkout and payment flow that survives retries, duplicate requests and partial failures
  • A read path for browsing and search (caching, a search index) and how it stays fresh
  • Scaling, failure handling and monitoring

Follow-up Questions Guidance

  • A popular new release goes on sale and thousands of customers try to buy the last few hundred copies at once. What happens?
  • The payment succeeds but the order service crashes before recording it. How does the system recover?
  • How do price changes reach search results and carts, and what does a customer pay if the price changes during checkout?
  • Add several warehouses. How do you choose which one fulfils an order?