-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.sql
More file actions
191 lines (153 loc) · 5.56 KB
/
database.sql
File metadata and controls
191 lines (153 loc) · 5.56 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
CREATE DATABASE database;
USE databae;
CREATE TABLE monitor (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
ip VARCHAR(30) NOT NULL,
cpu VARCHAR(30) NOT NULL,
tpms VARCHAR(50),
fpms VARCHAR(50),
reg_date TIMESTAMP
);
CREATE TABLE ipstage (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
ip VARCHAR(30) NOT NULL,
stage int(6) NOT NULL,
reg_date TIMESTAMP
);
//ips from first VMs
//insert into ipstage (ip,stage) values ('192.168.80.51', 1);
CREATE TABLE stagecontroller (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
ip VARCHAR(30) NOT NULL,
stage int(6) NOT NULL,
reg_date TIMESTAMP
);
CREATE TABLE atual (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
task VARCHAR(6) NOT NULL,
stage INT(6) NOT NULL,
reg_date TIMESTAMP
);
insert into atual(task,stage) value ('x',1);
insert into atual(task,stage) value ('x',2);
insert into atual(task,stage) value ('x',3);
// x when it starts
// task number while it processes
// y when it finishes
CREATE TABLE general (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
ntasks int(6) NOT NULL,
starttime bigint NOT NULL,
reg_date TIMESTAMP
);
//tasks number
insert into general (ntasks) values (40,0);
CREATE TABLE taskQueue (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
task VARCHAR(20) NOT NULL,
stage VARCHAR(2) NOT NULL,
reg_date TIMESTAMP
);
//insert all tasks in stage (1 in this case)
insert into taskQueue (task,stage) value ('image1.jpg',1);
insert into taskQueue (task,stage) value ('image2.jpg',1);
insert into taskQueue (task,stage) value ('image3.jpg',1);
insert into taskQueue (task,stage) value ('image4.jpg',1);
insert into taskQueue (task,stage) value ('image5.jpg',1);
insert into taskQueue (task,stage) value ('image6.jpg',1);
insert into taskQueue (task,stage) value ('image7.jpg',1);
insert into taskQueue (task,stage) value ('image8.jpg',1);
insert into taskQueue (task,stage) value ('image9.jpg',1);
insert into taskQueue (task,stage) value ('image10.jpg',1);
insert into taskQueue (task,stage) value ('image11.jpg',1);
insert into taskQueue (task,stage) value ('image12.jpg',1);
insert into taskQueue (task,stage) value ('image13.jpg',1);
insert into taskQueue (task,stage) value ('image14.jpg',1);
insert into taskQueue (task,stage) value ('image15.jpg',1);
insert into taskQueue (task,stage) value ('image16.jpg',1);
insert into taskQueue (task,stage) value ('image17.jpg',1);
insert into taskQueue (task,stage) value ('image18.jpg',1);
insert into taskQueue (task,stage) value ('image19.jpg',1);
insert into taskQueue (task,stage) value ('image20.jpg',1);
insert into taskQueue (task,stage) value ('image21.jpg',1);
insert into taskQueue (task,stage) value ('image22.jpg',1);
insert into taskQueue (task,stage) value ('image23.jpg',1);
insert into taskQueue (task,stage) value ('image24.jpg',1);
insert into taskQueue (task,stage) value ('image25.jpg',1);
insert into taskQueue (task,stage) value ('image26.jpg',1);
insert into taskQueue (task,stage) value ('image27.jpg',1);
insert into taskQueue (task,stage) value ('image28.jpg',1);
insert into taskQueue (task,stage) value ('image29.jpg',1);
insert into taskQueue (task,stage) value ('image30.jpg',1);
insert into taskQueue (task,stage) value ('image31.jpg',1);
insert into taskQueue (task,stage) value ('image32.jpg',1);
insert into taskQueue (task,stage) value ('image33.jpg',1);
insert into taskQueue (task,stage) value ('image34.jpg',1);
insert into taskQueue (task,stage) value ('image35.jpg',1);
insert into taskQueue (task,stage) value ('image36.jpg',1);
insert into taskQueue (task,stage) value ('image37.jpg',1);
insert into taskQueue (task,stage) value ('image38.jpg',1);
insert into taskQueue (task,stage) value ('image39.jpg',1);
insert into taskQueue (task,stage) value ('image40.jpg',1);
//also you can put in another stage
//insert into taskQueue (task,stage) value ('image1.jpg',2);
//insert into taskQueue (task,stage) value ('image2.jpg',2);
//...
//insert into taskQueue (task,stage) value ('image1.jpg',3);
//insert into taskQueue (task,stage) value ('image2.jpg',3);
//...
CREATE TABLE lockStatus (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
lockState VARCHAR(1) NOT NULL,
stage VARCHAR(2) NOT NuLL,
reg_date TIMESTAMP
);
insert into lockStatus (lockState,stage) value ('y',1);
insert into lockStatus (lockState,stage) value ('y',2);
insert into lockStatus (lockState,stage) value ('y',3);
CREATE TABLE vmadd (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
vm VARCHAR(20) NOT NULL,
stage VARCHAR(2),
reg_date TIMESTAMP
);
insert into vmadd (vm,stage) value ('x',1);
insert into vmadd (vm,stage) value ('x',2);
insert into vmadd (vm,stage) value ('x',3);
CREATE TABLE vmrem (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
vm VARCHAR(20) NOT NULL,
stage VARCHAR(2),
reg_date TIMESTAMP
);
insert into vmrem (vm,stage) value ('x',1);
insert into vmrem (vm,stage) value ('x',2);
insert into vmrem (vm,stage) value ('x',3);
CREATE TABLE logs (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
log VARCHAR(100) NOT NULL,
stage int(6) NOT NULL,
reg_date TIMESTAMP
);
CREATE TABLE wait (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
vm VARCHAR(20) NOT NULL,
reg_date TIMESTAMP
);
CREATE TABLE clock (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
time int(6) NOT NULL,
qnt int(6) NOT NULL,
cont int(6) NOT NULL,
stage int(6) NOT NULL,
reg_date TIMESTAMP
);
CREATE TABLE result (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
mtotal decimal(5,2) NOT NULL,
clock varchar(6) NOT NULL,
vms int(6) NOT NULL,
lastclocktime int(6) NOT NULL,
stage int(6) NOT NULL,
reg_date TIMESTAMP
);