-
Notifications
You must be signed in to change notification settings - Fork 0
/
database_setup.sql
executable file
·50 lines (45 loc) · 1002 Bytes
/
database_setup.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
DROP TABLE IF EXISTS Rectangle;
DROP TABLE IF EXISTS Room;
DROP TABLE IF EXISTS Robot;
DROP TABLE IF EXISTS Scenario;
CREATE TABLE Rectangle (
RectID INTEGER PRIMARY KEY,
X REAL,
Y REAL,
Width REAL,
Height REAL,
Angle REAL,
RoomID INTEGER,
FOREIGN KEY (RoomID) REFERENCES Room(RoomID)
);
CREATE TABLE Room (
RoomID INTEGER PRIMARY KEY,
Name VARCHAR(15) UNIQUE,
Width REAL,
Height REAL,
DateUsed DATETIME
);
CREATE TABLE Robot (
RobotID INTEGER PRIMARY KEY,
Name VARCHAR(15) UNIQUE,
NumberOfReadings INTEGER,
DistanceSensorFuzziness REAL,
AngleSensorFuzziness REAL,
DistanceMovedFuzziness REAL,
AngleRotatedFuzziness REAL,
DateUsed DATETIME
);
CREATE TABLE Scenario (
ScenarioID INTEGER PRIMARY KEY,
Name VARCHAR(15) UNIQUE,
RoomID INTEGER,
RobotID INTEGER,
SquareSize INTEGER,
CartographerGrid TEXT,
RobotPosX REAL,
RobotPosY REAL,
RobotAngle REAL,
DateUsed DATETIME,
FOREIGN KEY (RoomID) REFERENCES Room(RoomID),
FOREIGN KEY (RobotID) REFERENCES Robot(RobotID)
);