CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
🌙☀️
Log inStart free
Home/Templates/Mining, Metals & Chemicals

⛏️ Mining, Metals & Chemicals · Database ERD

Chemical Batch Traceability

Tables that trace a chemical product batch back to its raw material lots, process steps, quality tests and customer shipments, for recalls and audits.

More Mining, Metals & Chemicals 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

  • Every batch records which raw material lots went in
  • Quality tests are stored per batch and step
  • Shipments link batches to customers for recalls

Prompt used

Batch traceability database: raw material lots come from suppliers; production batches consume lots with quantities; each batch has process steps with parameters (temperature, pressure, duration); quality tests are recorded per batch with results; shipments to customers contain batches.

Mermaid code
erDiagram
  SUPPLIER ||--o{ RAW_LOT : supplies
  RAW_LOT ||--o{ BATCH_INPUT : "used in"
  BATCH ||--|{ BATCH_INPUT : consumes
  PRODUCT ||--o{ BATCH : "made as"
  BATCH ||--|{ PROCESS_STEP : "goes through"
  BATCH ||--o{ QUALITY_TEST : "tested by"
  BATCH ||--o{ SHIPMENT_LINE : "shipped in"
  SHIPMENT ||--|{ SHIPMENT_LINE : contains
  CUSTOMER ||--o{ SHIPMENT : receives
  SUPPLIER {
    int id PK
    string name
  }
  RAW_LOT {
    int id PK
    int supplier_id FK
    string material
    string lot_no
    date received_on
  }
  PRODUCT {
    int id PK
    string name
    string grade
  }
  BATCH {
    int id PK
    int product_id FK
    string batch_no
    date made_on
    string status
  }
  BATCH_INPUT {
    int id PK
    int batch_id FK
    int raw_lot_id FK
    decimal quantity_kg
  }
  PROCESS_STEP {
    int id PK
    int batch_id FK
    string step
    decimal temperature_c
    decimal pressure_bar
    int minutes
  }
  QUALITY_TEST {
    int id PK
    int batch_id FK
    string test
    decimal result
    boolean passed
  }
  CUSTOMER {
    int id PK
    string name
  }
  SHIPMENT {
    int id PK
    int customer_id FK
    date shipped_on
  }
  SHIPMENT_LINE {
    int id PK
    int shipment_id FK
    int batch_id FK
    decimal quantity_kg
  }

Inside this diagram

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

Tables and their columns

  • SUPPLIER: id (PK), name
  • RAW_LOT: id (PK), supplier_id (FK), material, lot_no, received_on
  • BATCH_INPUT: id (PK), batch_id (FK), raw_lot_id (FK), quantity_kg
  • BATCH: id (PK), product_id (FK), batch_no, made_on, status
  • PRODUCT: id (PK), name, grade
  • PROCESS_STEP: id (PK), batch_id (FK), step, temperature_c, pressure_bar, minutes
  • QUALITY_TEST: id (PK), batch_id (FK), test, result, passed
  • SHIPMENT_LINE: id (PK), shipment_id (FK), batch_id (FK), quantity_kg
  • SHIPMENT: id (PK), customer_id (FK), shipped_on
  • CUSTOMER: id (PK), name

Relationships

  • SUPPLIER supplies RAW_LOT: each SUPPLIER has zero or more RAW_LOT, each RAW_LOT belongs to exactly one SUPPLIER
  • RAW_LOT used in BATCH_INPUT: each RAW_LOT has zero or more BATCH_INPUT, each BATCH_INPUT belongs to exactly one RAW_LOT
  • BATCH consumes BATCH_INPUT: each BATCH has one or more BATCH_INPUT, each BATCH_INPUT belongs to exactly one BATCH
  • PRODUCT made as BATCH: each PRODUCT has zero or more BATCH, each BATCH belongs to exactly one PRODUCT
  • BATCH goes through PROCESS_STEP: each BATCH has one or more PROCESS_STEP, each PROCESS_STEP belongs to exactly one BATCH
  • BATCH tested by QUALITY_TEST: each BATCH has zero or more QUALITY_TEST, each QUALITY_TEST belongs to exactly one BATCH
  • BATCH shipped in SHIPMENT_LINE: each BATCH has zero or more SHIPMENT_LINE, each SHIPMENT_LINE belongs to exactly one BATCH
  • SHIPMENT contains SHIPMENT_LINE: each SHIPMENT has one or more SHIPMENT_LINE, each SHIPMENT_LINE belongs to exactly one SHIPMENT
  • CUSTOMER receives SHIPMENT: each CUSTOMER has zero or more SHIPMENT, each SHIPMENT belongs to exactly one CUSTOMER

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 ArchitectureProMining, Metals & Chemicals

Mine Fleet Management System

A fleet management system for an open-pit mine: dump trucks and shovels report position and payload, a dispatch engine assigns loads, and a control room watches production live.

State MachineMining, Metals & Chemicals

Haul Truck Cycle

The states of a mining haul truck in each load-and-dump cycle, used by dispatch systems to measure productivity and waiting time.

NetworkMining, Metals & Chemicals

Underground Mine Communication Network

How an underground mine keeps people connected and safe: leaky feeder radio, Wi-Fi, gas sensors and personnel tracking tags, linked to the surface control room.

SankeyMining, Metals & Chemicals

Ore to Metal Material Flow

How mined ore becomes finished metal in an iron and steel chain, in thousand tonnes per month, showing where material is lost.

DeploymentProMining, Metals & Chemicals

Smelter Process Control Deployment

Where the control systems of a metal smelter run: field instruments, PLCs and a DCS in the plant, a historian, and a separate business network behind a demilitarised zone.

FlowchartMining, Metals & Chemicals

Mine Blast Planning and Safety

How a mine plans and carries out a blast safely: drill pattern design, explosive loading, area clearance, the blast, and post-blast checks.