About This Architecture
IoT agricultural monitoring system with role-based access control (RBAC) spanning Customers, Fields, Devices, Sensors, SensorReadings, Alerts, Users, Roles, and Permissions tables. Data flows from physical sensors attached to devices in customer fields, through SensorTypes and SensorReadings, triggering Alerts based on thresholds. RBAC layer enforces least-privilege access: Admin users (customer_id = NULL) manage all Customers, while Customer users access only their own Fields and Devices. This architecture demonstrates multi-tenant IoT data isolation with granular permission control critical for agricultural SaaS platforms. Fork this ERD on Diagrams.so to customize entity relationships, add audit logging tables, or extend permission scopes for field managers and agronomists. Consider adding a DeviceGroups table for bulk sensor management and a SensorCalibration table for accuracy tracking in production deployments.