-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathexperiment-schema.sql
58 lines (52 loc) · 1.58 KB
/
experiment-schema.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
51
52
53
54
55
56
57
58
CREATE TABLE IF NOT EXISTS ExperimentTasks (
id int GENERATED BY DEFAULT AS IDENTITY (START WITH 1 INCREMENT BY 1) PRIMARY KEY,
experimentType VARCHAR(10),
matching VARCHAR(50),
annotatorName VARCHAR(100),
datasetName VARCHAR(100),
language VARCHAR(3),
microF1 double,
microPrecision double,
microRecall double,
macroF1 double,
macroPrecision double,
macroRecall double,
errorCount int,
state int,
lastChanged TIMESTAMP,
version VARCHAR(20)
);
CREATE TABLE IF NOT EXISTS Experiments (
id VARCHAR(300) NOT NULL,
taskId int NOT NULL,
PRIMARY KEY (id, taskId)
);
-- Changes from GERBIL QA 0.1.0 to 0.2.0
-- (ALTER should be executed only once for updating old DBs
-- ALTER TABLE ExperimentTasks ADD COLUMN language varchar(3);
UPDATE ExperimentTasks SET language='en' WHERE language IS NULL;
DROP INDEX IF EXISTS ExperimentTaskConfig;
CREATE INDEX ExperimentTaskConfig ON ExperimentTasks (matching,experimentType,annotatorName,datasetName,language,macroF1,microF1);
-- Changes from version 1.0.0 to 1.1.0
CREATE TABLE IF NOT EXISTS ExperimentTasks_Version (
id int PRIMARY KEY,
version VARCHAR(20)
);
-- Changes from version 1.1.0 to OKE2015
CREATE TABLE IF NOT EXISTS ExperimentTasks_AdditionalResults (
resultId int NOT NULL,
taskId int NOT NULL,
value double,
PRIMARY KEY (resultId, taskId)
);
CREATE TABLE IF NOT EXISTS ExperimentTasks_SubTasks (
taskId int NOT NULL,
subTaskId int NOT NULL,
PRIMARY KEY (taskId, subTaskId)
);
CREATE TABLE IF NOT EXISTS ExperimentTasks_AdditionalBlobResults (
taskId int NOT NULL,
resultId int NOT NULL,
resultValue BLOB,
PRIMARY KEY (taskId, resultId)
);