Skip to content
Snippets Groups Projects
Commit 8dc41c17 authored by Sara Savanovic Djordjevic's avatar Sara Savanovic Djordjevic
Browse files

add: sqlite db and schema

parent 41bdea01
No related branches found
No related tags found
No related merge requests found
File added
CREATE TABLE Measurement (
MeasurementID INT PRIMARY KEY,
SensorID INT,
TimeMeasured DATETIME,
Latitude FLOAT,
Longitude FLOAT,
MeasuredThickness FLOAT,
Accuracy FLOAT,
FOREIGN KEY (SensorID) REFERENCES Sensor(SensorID)
);
CREATE TABLE Sensor (
SensorID INTEGER PRIMARY KEY,
SensorType TEXT CHECK(SensorType IN ('LiDar', 'Magnetic', 'Other')),
Active BOOLEAN
);
INSERT INTO Sensor (SensorID, SensorType, Active) VALUES
(1, 'LiDar', 1),
(2, 'Magnetic', 1),
(3, 'Other', 0);
INSERT INTO Measurement (MeasurementID, SensorID, TimeMeasured, Latitude, Longitude, MeasuredThickness, Accuracy) VALUES
(1, 2, '2024-01-01 10:00:00', 60.7066, 10.9771, 10.0, 1.0),
(2, 2, '2024-02-04 11:00:00', 60.6366, 10.8171, 7.8, 1.5),
(3, 1, '2024-02-13 12:00:00', 60.7366, 10.8471, 7.2, 2.5);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment