adds database layout as file
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Finn Dane 2023-11-16 14:58:53 +01:00
parent 5d88bf4bf8
commit 7659efad5f
1 changed files with 13 additions and 0 deletions

13
docs/database.sql Normal file
View File

@ -0,0 +1,13 @@
CREATE TABLE IF NOT EXISTS sensor(
sensorId INTEGER NOT NULL PRIMARY KEY,
resolution REAL NOT NULL,
accuracy REAL NOT NULL
);
CREATE TABLE IF NOT EXISTS dataPoint(
dataPointId INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
sensorFK INTEGER NOT NULL,
timestamp INTEGER NOT NULL,
value REAL NOT NULL,
FOREIGN KEY(sensorFK) REFERENCES sensor(sensorId)
);