Catalogues, carts, orders and payments. These schemas share one rule: anything a customer could be shown on a receipt years from now is snapshotted at purchase time rather than joined from a catalogue that keeps changing. Every one opens in the free drawDB editor in a click, and is public domain.
6 schemas here, from 12 to 13 tables (75 tables and 656 columns in total), written for PostgreSQL, MySQL. Each one ships an ER diagram you can open and edit, a column-by-column reference, design notes explaining the trade-offs, and SQL for all six dialects. Recurring themes across the set: marketplace.
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.
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.
How a handmade marketplace models its data: shops and sections, made-to-order listings with variations and personalisation, cross-shop carts, orders split per shop, shipping profiles and photo reviews.
How an in-store point of sale is modelled: stores and registers, cashier shifts with opening float and closing count, sales with discounted lines, multi-tender payment, returns against the original sale, drawer movements and approved price overrides.
How a hosted commerce platform models many shops at once: merchants and shops as tenants, per-shop staff roles, catalogue and orders scoped by shop_id, installed apps with OAuth scopes, and webhook delivery attempts.
How recurring physical commerce is modelled: plans and subscriptions, one row per billing cycle, preferences that drive curation, per-cycle box contents, shipments, skips and pauses, churn reasons and referral credit.