-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcreate.sql
More file actions
53 lines (40 loc) · 1.14 KB
/
create.sql
File metadata and controls
53 lines (40 loc) · 1.14 KB
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
51
52
53
CREATE TABLE report (
id int primary key NOT NULL,
experimentId varchar(50) NOT NULL UNIQUE
);
CREATE TABLE image (
id int primary key NOT NULL,
report_id int NOT NULL references report(id),
metric varchar(20) NOT NULL,
chartTypes varchar(20) NOT NULL,
imageAsBytea bytea NOT NULL
);
CREATE TABLE experiment (
id int primary key NOT NULL,
taskid varchar(50) NOT NULL UNIQUE,
dispatcher varchar(50) NOT NULL
);
CREATE TABLE result (
id int primary key NOT NULL,
measurement varchar(50) NOT NULL
);
CREATE TABLE resultvalue (
id int primary key NOT NULL,
timestamp varchar(50) NOT NULL,
value FLOAT NOT NULL
);
CREATE SEQUENCE report_sequence START 1;
CREATE SEQUENCE image_sequence START 1;
CREATE SEQUENCE experiment_sequence START 1;
CREATE SEQUENCE result_sequence START 1;
CREATE SEQUENCE resultvalue_sequence START 1;
CREATE TABLE experiment_result(
experiment_id int NOT NULL references experiment(id),
result_id int NOT NULL references result(id)
)
;
CREATE TABLE result_value(
result_id int NOT NULL references result(id),
value_id int NOT NULL references resultvalue(id)
)
;