CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
🌙☀️
Log inStart free
Home/Templates/Food Delivery & QSR

🍔 Food Delivery & QSR · Database ERD

Food Delivery Menu and Orders Schema

A schema for a food delivery platform: restaurants, menus, items with add-ons, customers, orders, order items and riders.

More Food Delivery & QSR templates

Opening a template is free and never counts toward your daily diagrams. Asking the AI to change it counts as one.

Drawing diagram…

What this diagram shows

  • Menu items have variants and add-on groups
  • Order items capture the price at the time of order
  • Each order is assigned to one rider

Prompt used

ERD for food delivery: Restaurant has MenuCategories with MenuItems; MenuItem has AddOnGroups with AddOns (extra cheese); Customer places Orders at a Restaurant; Order has OrderItems (with selected add-ons and price at order time); Rider is assigned to Orders; Address stores delivery locations.

Mermaid code
erDiagram
  RESTAURANT ||--|{ MENU_CATEGORY : has
  MENU_CATEGORY ||--|{ MENU_ITEM : lists
  MENU_ITEM ||--o{ ADDON_GROUP : offers
  ADDON_GROUP ||--|{ ADDON : contains
  CUSTOMER ||--o{ ADDRESS : saves
  CUSTOMER ||--o{ ORDER : places
  RESTAURANT ||--o{ ORDER : receives
  ORDER ||--|{ ORDER_ITEM : contains
  MENU_ITEM ||--o{ ORDER_ITEM : "ordered as"
  RIDER ||--o{ ORDER : delivers
  MENU_ITEM {
    int id PK
    int category_id FK
    string name
    decimal price
    bool veg
  }
  ORDER {
    int id PK
    int customer_id FK
    int restaurant_id FK
    int rider_id FK
    string status
    decimal total
  }
  ORDER_ITEM {
    int id PK
    int order_id FK
    int item_id FK
    int quantity
    decimal unit_price
  }

Inside this diagram

An entity relationship diagram with 10 tables, 16 columns and 10 relationships.

Tables and their columns

  • RESTAURANT
  • MENU_CATEGORY
  • MENU_ITEM: id (PK), category_id (FK), name, price, veg
  • ADDON_GROUP
  • ADDON
  • CUSTOMER
  • ADDRESS
  • ORDER: id (PK), customer_id (FK), restaurant_id (FK), rider_id (FK), status, total
  • ORDER_ITEM: id (PK), order_id (FK), item_id (FK), quantity, unit_price
  • RIDER

Relationships

  • RESTAURANT has MENU_CATEGORY: each RESTAURANT has one or more MENU_CATEGORY, each MENU_CATEGORY belongs to exactly one RESTAURANT
  • MENU_CATEGORY lists MENU_ITEM: each MENU_CATEGORY has one or more MENU_ITEM, each MENU_ITEM belongs to exactly one MENU_CATEGORY
  • MENU_ITEM offers ADDON_GROUP: each MENU_ITEM has zero or more ADDON_GROUP, each ADDON_GROUP belongs to exactly one MENU_ITEM
  • ADDON_GROUP contains ADDON: each ADDON_GROUP has one or more ADDON, each ADDON belongs to exactly one ADDON_GROUP
  • CUSTOMER saves ADDRESS: each CUSTOMER has zero or more ADDRESS, each ADDRESS belongs to exactly one CUSTOMER
  • CUSTOMER places ORDER: each CUSTOMER has zero or more ORDER, each ORDER belongs to exactly one CUSTOMER
  • RESTAURANT receives ORDER: each RESTAURANT has zero or more ORDER, each ORDER belongs to exactly one RESTAURANT
  • ORDER contains ORDER_ITEM: each ORDER has one or more ORDER_ITEM, each ORDER_ITEM belongs to exactly one ORDER
  • MENU_ITEM ordered as ORDER_ITEM: each MENU_ITEM has zero or more ORDER_ITEM, each ORDER_ITEM belongs to exactly one MENU_ITEM
  • RIDER delivers ORDER: each RIDER has zero or more ORDER, each ORDER belongs to exactly one RIDER

Make your own diagram like this

Describe your own system in plain English and the AI ER diagram generator draws it in seconds, in the same style as this template.

Related templates

C4 ArchitectureProFood Delivery & QSR

Food Delivery Platform Architecture

A Swiggy/Zomato-style food delivery platform: customer, restaurant and rider apps, and the services that match orders, riders and payments.

SequenceFood Delivery & QSR

Food Order to Doorstep Sequence

Everything that happens between a customer tapping Place Order and the food arriving: payment, restaurant acceptance, rider assignment, pickup and delivery.

State MachineFood Delivery & QSR

Food Order Status State Machine

Every status of a food delivery order, from placed to delivered, including restaurant rejection, no rider and customer cancellation.

FlowchartFood Delivery & QSR

Restaurant Kitchen Order Flow

How orders from dine-in, takeaway and delivery apps flow through a restaurant kitchen display system to the pass and out.

DeploymentProFood Delivery & QSR

Food Delivery Peak-Hour Scaling

How a food delivery platform scales for lunch and dinner peaks: pre-scaling, autoscaling services, sharded databases and a surge-protected dispatch.

C4 ArchitectureProFood Delivery & QSR

Cloud Kitchen Operations Platform

A cloud kitchen that runs several virtual brands: orders from aggregators, a kitchen display system, inventory and dispatch.