CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
πŸŒ™β˜€οΈ
Log inStart free
Home/Templates/Retail & E-commerce

πŸ›’ Retail & E-commerce Β· Database ERD

Product Catalog Database Schema

A flexible product catalog: categories, products with variants (size, colour), prices, stock per warehouse and images.

More Retail & E-commerce templates

Drawing diagram…

What this diagram shows

  • Products have variants (SKUs) such as size and colour
  • Stock is tracked per SKU per warehouse
  • Categories can be nested

Prompt used

ERD for an e-commerce catalog: Category (with parent category), Product in a Category, Brand, ProductVariant (SKU) with attributes like size and colour, Price per variant with sale price, Inventory per variant per Warehouse, and ProductImage.

Mermaid code
erDiagram
  CATEGORY ||--o{ CATEGORY : "parent of"
  CATEGORY ||--o{ PRODUCT : contains
  BRAND ||--o{ PRODUCT : makes
  PRODUCT ||--|{ PRODUCT_VARIANT : "sold as"
  PRODUCT ||--o{ PRODUCT_IMAGE : shows
  PRODUCT_VARIANT ||--|| PRICE : "priced at"
  PRODUCT_VARIANT ||--o{ INVENTORY : stocked
  WAREHOUSE ||--o{ INVENTORY : holds
  PRODUCT {
    int id PK
    int category_id FK
    int brand_id FK
    string title
  }
  PRODUCT_VARIANT {
    int id PK
    int product_id FK
    string sku
    string size
    string colour
  }
  PRICE {
    int variant_id FK
    decimal mrp
    decimal sale_price
  }
  INVENTORY {
    int variant_id FK
    int warehouse_id FK
    int quantity
  }

Related templates

C4 ArchitectureProRetail & E-commerce

E-commerce Microservices Architecture

An online store split into microservices: catalog, cart, orders, payments and search, with Kafka events connecting them to shipping and notifications.

SequenceRetail & E-commerce

Checkout and Payment Sequence

What happens when a shopper clicks Pay: stock is reserved, the payment is authorised, the order is created and stock is released again if payment fails.

State MachineRetail & E-commerce

Order Lifecycle State Machine

Every status an online order moves through, from placed to delivered, including cancellations, returns and refunds.

Data FlowRetail & E-commerce

Omnichannel Inventory Sync

How stock stays in sync across stores, warehouses and marketplaces so the same item isn't sold twice.

FlowchartRetail & E-commerce

Returns and Refunds Workflow

How an online store handles a return: eligibility, pickup, quality check at the warehouse and the refund or replacement.

Data FlowRetail & E-commerce

Product Recommendation Engine

How an online store builds 'recommended for you' and 'frequently bought together': click and order data, model training and a fast serving layer.