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

Delete schema.sql

parent 6863b838
No related branches found
No related tags found
No related merge requests found
CREATE TABLE Zone (
ZoneID INT PRIMARY KEY,
Area INT NULL,
Depth INT,
ReportID INT,
SensorID INT,
FOREIGN KEY (ReportID) REFERENCES Report(ReportID),
FOREIGN KEY (SensorID) REFERENCES Sensor(SensorID)
);
CREATE TABLE Sensor (
SensorID INT PRIMARY KEY,
SensorType CHAR,
Latitued DECIMAL(9,6) NOT NULL,
Longitude DECIMAL(9,6) NOT NULL,
ServiceStart DATETIME,
Active BOOLEAN NOT NULL
);
CREATE TABLE Report (
ReportID INT PRIMARY KEY,
Latitued DECIMAL(9,6) NOT NULL,
Longitude DECIMAL(9,6) NOT NULL,
DateTime DATETIME NOT NULL,
MeasuredThickes NULL NOT NULL,
CalculatedThickness INT NOT NULL,
SafetyAssesment CHAR NOT NULL,
Temperature FLOAT,
Humidity FLOAT,
Percipitation FLOAT
);
-- Specialization of Report entity
CREATE TABLE AnalogReport (
ReportID INT PRIMARY KEY,
Username CHAR PRIMARY KEY,
Method CHAR NOT NULL,
Message CHAR,
FOREIGN KEY (ReportID) REFERENCES Report(ReportID)
);
-- Specialization of Report entity
CREATE TABLE SensorReport (
ReportID INT PRIMARY KEY,
SensorID INT PRIMARY KEY,
FOREIGN KEY (ReportID) REFERENCES Report(ReportID),
FOREIGN KEY (SensorID) REFERENCES Sensor(SensorID)
);
\ No newline at end of file
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