-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcreate.sql
More file actions
40 lines (35 loc) · 931 Bytes
/
create.sql
File metadata and controls
40 lines (35 loc) · 931 Bytes
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
-- TODO: create a standard user for the database
CREATE DATABASE UWNet;
USE UWNet;
CREATE TABLE InputQueue(
id INT NOT NULL AUTO_INCREMENT,
mpwr INT NOT NULL,
lpwr INT NOT NULL,
ppwr INT NOT NULL,
mbkn INT NOT NULL,
lbkn INT NOT NULL,
pbkn INT NOT NULL,
mmod INT NOT NULL,
lmod INT NOT NULL,
pmod INT NOT NULL,
rptt INT NOT NULL,
testData VARCHAR(1024),
email VARCHAR(128),
dateSubmitted DATETIME NOT NULL,
exitStatus INT DEFAULT NULL,
dateCompleted DATETIME DEFAULT NULL,
emailSent BOOL DEFAULT FALSE,
plotsGenerated BOOL DEFAULT FALSE,
PRIMARY KEY(id)
);
CREATE TABLE Results(
experimentID INT NOT NULL,
-- TODO:
-- 1) possibly replace 'parameters' with 3 columns:
-- - 'pwr', 'bkn', 'mod'
-- 2) possibly replace 'results':
-- - maybe have datetime columns for start time, end time
parameters VARCHAR(2048),
results VARCHAR(2048),
FOREIGN KEY(experimentID) REFERENCES InputQueue(id)
);