
📡 IoT · Database ERD
A database schema for managing an IoT fleet: devices, models, firmware versions, certificates, customers and sites.
Drawing diagram…
ERD for an IoT device registry: Customer has Sites; Device belongs to a Site, is a DeviceModel and runs a FirmwareVersion; Device has Certificates with expiry; DeviceModel has many FirmwareVersions; DeviceEvent records status changes for each device.
erDiagram
CUSTOMER ||--o{ SITE : owns
SITE ||--o{ DEVICE : hosts
DEVICE_MODEL ||--o{ DEVICE : "type of"
DEVICE_MODEL ||--o{ FIRMWARE_VERSION : releases
FIRMWARE_VERSION ||--o{ DEVICE : "running on"
DEVICE ||--o{ CERTIFICATE : "identified by"
DEVICE ||--o{ DEVICE_EVENT : logs
DEVICE {
string serial PK
int site_id FK
int model_id FK
int firmware_id FK
string status
}
FIRMWARE_VERSION {
int id PK
int model_id FK
string version
date released_on
}
CERTIFICATE {
string thumbprint PK
string device_serial FK
date expires_on
}
DEVICE_EVENT {
int id PK
string device_serial FK
string type
datetime at
}How sensor readings travel from devices to dashboards and alerts: MQTT ingestion, stream processing, time-series storage and anomaly detection.
How a new device joins the platform securely: claiming by the owner, certificate issue and its first connection to the MQTT broker.
A general-purpose IoT platform: device connectivity, device management, data processing, rules and the apps built on top.
Where processing happens in an edge IoT setup: devices, an on-site edge server running containers, and the cloud for fleet management and long-term storage.
How a smart home reacts to events: motion, door and temperature triggers run rules for lights, locks, AC and alerts.
How MQTT messaging works between devices, a broker and applications: connect, subscribe, publish with QoS, retained messages and last will.