CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
🌙☀️
Log inStart free
Home/Templates/Maritime, Ports & Shipping

🚢 Maritime, Ports & Shipping · Database ERD

Ocean Freight Booking Schema

Tables for an ocean freight booking platform: shippers, bookings, containers, voyages, bills of lading and tracking events.

More Maritime, Ports & Shipping 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

  • One booking can have several containers
  • Each container is tracked through events
  • The bill of lading ties the booking to the voyage

Prompt used

Ocean freight database: shippers make bookings from an origin port to a destination port on a voyage; a voyage belongs to a vessel; bookings have containers; each container has tracking events; a bill of lading is issued per booking.

Mermaid code
erDiagram
  SHIPPER ||--o{ BOOKING : makes
  VESSEL ||--o{ VOYAGE : sails
  VOYAGE ||--o{ BOOKING : carries
  PORT ||--o{ BOOKING : "loads at"
  BOOKING ||--|{ CONTAINER : includes
  CONTAINER ||--o{ TRACKING_EVENT : has
  BOOKING ||--o| BILL_OF_LADING : "documented by"
  SHIPPER {
    int id PK
    string name
    string gstin
  }
  VESSEL {
    int id PK
    string name
    string imo_number
  }
  VOYAGE {
    int id PK
    int vessel_id FK
    string voyage_no
    date departure
  }
  PORT {
    int id PK
    string code
    string name
  }
  BOOKING {
    int id PK
    int shipper_id FK
    int voyage_id FK
    int origin_port_id FK
    int dest_port_id
    string status
  }
  CONTAINER {
    int id PK
    int booking_id FK
    string container_no
    string size_type
    decimal weight
  }
  TRACKING_EVENT {
    int id PK
    int container_id FK
    string event
    string location
    datetime event_time
  }
  BILL_OF_LADING {
    int id PK
    int booking_id FK
    string bl_number
    date issued_on
  }

Inside this diagram

An entity relationship diagram with 8 tables, 33 columns and 7 relationships.

Tables and their columns

  • SHIPPER: id (PK), name, gstin
  • BOOKING: id (PK), shipper_id (FK), voyage_id (FK), origin_port_id (FK), dest_port_id, status
  • VESSEL: id (PK), name, imo_number
  • VOYAGE: id (PK), vessel_id (FK), voyage_no, departure
  • PORT: id (PK), code, name
  • CONTAINER: id (PK), booking_id (FK), container_no, size_type, weight
  • TRACKING_EVENT: id (PK), container_id (FK), event, location, event_time
  • BILL_OF_LADING: id (PK), booking_id (FK), bl_number, issued_on

Relationships

  • SHIPPER makes BOOKING: each SHIPPER has zero or more BOOKING, each BOOKING belongs to exactly one SHIPPER
  • VESSEL sails VOYAGE: each VESSEL has zero or more VOYAGE, each VOYAGE belongs to exactly one VESSEL
  • VOYAGE carries BOOKING: each VOYAGE has zero or more BOOKING, each BOOKING belongs to exactly one VOYAGE
  • PORT loads at BOOKING: each PORT has zero or more BOOKING, each BOOKING belongs to exactly one PORT
  • BOOKING includes CONTAINER: each BOOKING has one or more CONTAINER, each CONTAINER belongs to exactly one BOOKING
  • CONTAINER has TRACKING_EVENT: each CONTAINER has zero or more TRACKING_EVENT, each TRACKING_EVENT belongs to exactly one CONTAINER
  • BOOKING documented by BILL_OF_LADING: each BOOKING has zero or one BILL_OF_LADING, each BILL_OF_LADING belongs to exactly one BOOKING

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 ArchitectureProMaritime, Ports & Shipping

Port Community System

A port community system that connects shipping lines, terminals, customs, freight forwarders and truckers on one platform, so documents are shared once instead of emailed many times.

SequenceMaritime, Ports & Shipping

Import Container Clearance Sequence

The journey of an import container from unloading to leaving the port: discharge, customs filing, duty payment, delivery order and gate out.

State MachineMaritime, Ports & Shipping

Shipping Container States

The states a shipping container goes through in an export journey, from empty pick-up to delivery at the destination.

Data FlowMaritime, Ports & Shipping

Vessel Tracking with AIS

How ships are tracked worldwide: AIS signals picked up by coastal stations and satellites, cleaned, matched to voyages and used for arrival predictions.

DeploymentProMaritime, Ports & Shipping

Container Terminal Operating System

Where a container terminal's systems run: the terminal operating system in the data centre, equipment control on cranes and yard vehicles, and gates with automation.

FlowchartMaritime, Ports & Shipping

Vessel Arrival and Berthing

How a port handles an arriving ship: pre-arrival notice, berth allocation, pilot boarding, tug assistance and berthing.