E-commerce store database schema
A production-shaped e-commerce schema: products with variants, inventory per location, carts, orders with snapshotted line items, payments and shipments. Open it in the editor or export SQL for six dialects.
Ecommerce Store ER diagram
Related database schemas
Warehouse & inventory management database schema
Bin-level inventory done properly: warehouses and storage locations, lot tracking for recalls, an append-only stock movement log with derived stock levels, purchase orders and outbound shipments.
Banking ledger database schema (double-entry)
A double-entry bank ledger: accounts in a single currency each, balanced journal entries that are never updated, card authorizations that hold funds, transfers kept separate from postings, and frozen statements.
Hotel booking & reservation database schema
A reservation system that actually handles availability: room types versus rooms, rate plans, a per-night rate and inventory calendar, reservations broken down by night, payments and verified reviews.
Amazon-style marketplace database schema
How a marketplace models many sellers listing the same product: a shared catalogue, competing offers, the buy box decision as a log, orders split into per-seller sub-orders, fulfilment, payouts and product-level reviews.
