CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
πŸŒ™β˜€οΈ
Log inStart free
Home/Templates/Logistics & Supply Chain

🚚 Logistics & Supply Chain · Database ERD

Logistics Shipment Database Schema

Tables for a logistics system: customers, shipments, packages, consignment legs, hubs, vehicles and tracking events.

More Logistics & Supply Chain templates

Drawing diagram…

What this diagram shows

  • A shipment can travel through several legs and hubs
  • Tracking events are kept per package, not per shipment
  • Proof of delivery is stored with the final event

Prompt used

Logistics database schema: customers create shipments; a shipment has one or more packages; the shipment moves in legs between hubs, each leg assigned to a vehicle; every package has tracking events (picked up, in hub, out for delivery, delivered) with location and time; proof of delivery is attached to the delivery event.

Mermaid code
erDiagram
  CUSTOMER ||--o{ SHIPMENT : books
  SHIPMENT ||--|{ PACKAGE : contains
  SHIPMENT ||--|{ LEG : "moves in"
  HUB ||--o{ LEG : "origin of"
  VEHICLE ||--o{ LEG : carries
  PACKAGE ||--o{ TRACKING_EVENT : logs
  TRACKING_EVENT ||--o| PROOF_OF_DELIVERY : "may have"
  CUSTOMER {
    int id PK
    string name
    string gstin
  }
  SHIPMENT {
    int id PK
    int customer_id FK
    string awb_no
    string service_level
  }
  PACKAGE {
    int id PK
    int shipment_id FK
    decimal weight_kg
    string barcode
  }
  LEG {
    int id PK
    int shipment_id FK
    int from_hub_id FK
    int vehicle_id FK
    datetime departed_at
  }
  HUB {
    int id PK
    string code
    string city
  }
  VEHICLE {
    int id PK
    string registration
    string type
  }
  TRACKING_EVENT {
    int id PK
    int package_id FK
    string status
    datetime at
    string location
  }
  PROOF_OF_DELIVERY {
    int id PK
    int event_id FK
    string receiver_name
    string photo_url
  }

Related templates

SequenceLogistics & Supply Chain

Last-Mile Delivery Sequence

From an order leaving the hub to the parcel at the customer's door: rider assignment, live tracking, OTP handover and proof of delivery.

C4 ArchitectureProLogistics & Supply Chain

Shipment Tracking Platform Architecture

A logistics platform that tracks shipments across carriers: booking, scan events from hubs, carrier integrations and customer notifications.

FlowchartLogistics & Supply Chain

Warehouse Inbound Receiving

How a warehouse receives goods: appointment, unloading, checking against the ASN, quality check, putaway and stock update.

Data FlowLogistics & Supply Chain

Fleet Route Optimisation Data Flow

How a delivery company plans daily routes: orders, vehicle capacity, time windows and live traffic feed a route optimiser that assigns stops to drivers.

State MachineLogistics & Supply Chain

Freight Booking Lifecycle

The states of a freight shipment booking, from quote and booking through pickup, transit, customs and delivery.

DeploymentProLogistics & Supply Chain

Cold Chain Monitoring Deployment

Where cold chain monitoring runs for vaccines or fresh food: temperature loggers in reefers and cold rooms, gateways, and a cloud alerting platform.