SAMPLE
Tables (8)
DeviceControls
- ControlID — INT
- DeviceID — INT — NOT NULL
- Command — VARCHAR(50) — NOT NULL
- ControlTime — DATETIME — NOT NULL
- UserID — INT — NOT NULL
Devices
- DeviceID — INT
- DeviceName — VARCHAR(100) — NOT NULL
- DeviceType — VARCHAR(50) — NOT NULL
- Location — VARCHAR(100) — NOT NULL
- UserID — INT — NOT NULL
Notifications
- NotificationID — INT
- Message — VARCHAR(500) — NOT NULL
- UserID — INT — NOT NULL
- NotificationTime — DATETIME — NOT NULL
SensorData
- DataID — INT
- SensorID — INT — NOT NULL
- Value — FLOAT — NOT NULL
- MeasuredTime — DATETIME — NOT NULL
Sensors
- SensorID — INT
- SensorName — VARCHAR(100) — NOT NULL
- SensorType — VARCHAR(50) — NOT NULL
- DeviceID — INT — NOT NULL
locations
- id — int — Primary key — NOT NULL
- name — varchar(100) — NOT NULL
sensorData
- id — bigint — Primary key — NOT NULL
- sensorId — int — Foreign key → sensors.id — NOT NULL
- occurredOn — datetime2(7) — NOT NULL
- occurredValue — float — NOT NULL
sensors
- id — int — Primary key — NOT NULL
- locationId — int — Foreign key → locations.id — NOT NULL
- name — varchar(100) — NOT NULL
- type — varchar(50) — NOT NULL