-
Notifications
You must be signed in to change notification settings - Fork 0
/
SCHEMA
181 lines (181 loc) · 4.43 KB
/
SCHEMA
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
CREATE TABLE chamber(
ID INTEGER PRIMARY KEY,
NAME TEXT UNIQUE
);
CREATE TABLE fan(
ID INTEGER PRIMARY KEY,
GROUP_ID INTEGER NOT NULL REFERENCES fan_group(ID),
NAME TEXT,
TAG TEXT,
SPEED NUMERIC
);
CREATE TABLE fan_group(
ID INTEGER PRIMARY KEY,
CHAMBER_ID INTEGER NOT NULL REFERENCES chamber(ID),
NAME TEXT,
TAG TEXT,
ENABLE NUMERIC
);
CREATE TABLE melt_pump(
ID INTEGER PRIMARY KEY,
ZONE_ID INTEGER NOT NULL REFERENCES melt_zone(ID),
NAME TEXT,
TAG TEXT,
PRES_IN NUMERIC,
PRES_IN_TIME NUMERIC,
PRES_IN_MIN NUMERIC,
PRES_IN_MAX NUMERIC,
PRES_OUT NUMERIC,
PRES_OUT_TIME NUMERIC,
PRES_OUT_MIN NUMERIC,
PRES_OUT_MAX NUMERIC
);
CREATE TABLE melt_temp(
ID INTEGER PRIMARY KEY,
ZONE_ID INTEGER NOT NULL REFERENCES melt_zone(ID),
NAME TEXT,
TAG TEXT,
TEMP NUMERIC,
TEMP_TIME NUMERIC,
TEMP_MIN NUMERIC,
TEMP_MAX NUMERIC
);
CREATE TABLE melt_zone(
ID INTEGER PRIMARY KEY,
CHAMBER_ID INTEGER NOT NULL REFERENCES chamber(ID),
NAME TEXT,
TAG TEXT,
ENABLE NUMERIC
);
CREATE TABLE recipe(
ID INTEGER PRIMARY KEY,
NAME TEXT UNIQUE
, DESCRIPTION TEXT);
CREATE TABLE recipe_fan(
FAN_ID INTEGER NOT NULL REFERENCES fan(ID),
RECIPE_ID INTEGER NOT NULL REFERENCES recipe(ID),
SPEED NUMERIC,
PRIMARY KEY(FAN_ID, RECIPE_ID)
);
CREATE TABLE recipe_fan_group(
GROUP_ID INTEGER NOT NULL REFERENCES fan_group(ID),
RECIPE_ID INTEGER NOT NULL REFERENCES recipe(ID),
ENABLE NUMERIC,
PRIMARY KEY(GROUP_ID,RECIPE_ID)
);
CREATE TABLE recipe_melt(
MELT_ID INTEGER,
RECIPE_ID INTEGER,
PRES_IN NUMERIC,
PRES_IN_TIME NUMERIC,
PRES_IN_MIN NUMERIC,
PRES_IN_MAX NUMERIC,
PRES_OUT NUMERIC,
PRES_OUT_TIME NUMERIC,
PRES_OUT_MIN NUMERIC,
PRES_OUT_MAX NUMERIC,
TEMP NUMERIC,
TEMP_TIME NUMERIC,
TEMP_MIN NUMERIC,
TEMP_MAX NUMERIC,
PRIMARY KEY(MELT_ID,RECIPE_ID)
);
CREATE TABLE recipe_melt_pump(
PUMP_ID INTEGER NOT NULL REFERENCES melt_pump(ID),
RECIPE_ID INTEGER NOT NULL REFERENCES recipe(ID),
PRES_IN NUMERIC,
PRES_IN_TIME NUMERIC,
PRES_IN_MIN NUMERIC,
PRES_IN_MAX NUMERIC,
PRES_OUT NUMERIC,
PRES_OUT_TIME NUMERIC,
PRES_OUT_MIN NUMERIC,
PRES_OUT_MAX NUMERIC,
PRIMARY KEY(PUMP_ID, RECIPE_ID)
);
CREATE TABLE recipe_melt_temp(
TEMP_ID INTEGER NOT NULL REFERENCES melt_temp(ID),
RECIPE_ID INTEGER NOT NULL REFERENCES recipe(ID),
TEMP NUMERIC,
TEMP_TIME NUMERIC,
TEMP_MIN NUMERIC,
TEMP_MAX NUMERIC,
PRIMARY KEY(TEMP_ID, RECIPE_ID)
);
CREATE TABLE recipe_melt_zone(
ZONE_ID INTEGER NOT NULL REFERENCES melt_zone(ID),
RECIPE_ID INTEGER NOT NULL REFERENCES recipe(ID),
ENABLE NUMERIC,
PRIMARY KEY(ZONE_ID, RECIPE_ID)
);
CREATE TABLE recipe_solution(
SOLUTION_ID INTEGER NOT NULL REFERENCES solution(ID),
RECIPE_ID INTEGER NOT NULL REFERENCES recipe(ID),
DISP_VOL1 NUMERIC,
DISP_TIME1 NUMERIC,
DISP_VOL2 NUMERIC,
DISP_TIME2 NUMERIC,
SB_VOL NUMERIC,
SB_TIME NUMERIC,
SB_DELAY NUMERIC,
RECHG_TIME NUMERIC,
PRE_DISP_VOL NUMERIC,
PRE_DISP_TIME NUMERIC,
PRE_DISP_DELAY NUMERIC,
DISP_CAL_VOL NUMERIC,
PRE_DISP_CAL_VOL NUMERIC,
PRIMARY KEY(SOLUTION_ID, RECIPE_ID)
);
CREATE TABLE recipe_spin(
SPIN_ID INTEGER NOT NULL REFERENCES spin(ID),
RECIPE_ID INTEGER NOT NULL REFERENCES recipe(ID),
HEIGHT NUMERIC,
SPEED NUMERIC,
ACCEL NUMERIC,
DIR NUMERIC,
PRIMARY KEY(SPIN_ID, RECIPE_ID)
);
CREATE TABLE recipe_substrate(
SUBSTR_ID INTEGER NOT NULL REFERENCES substrate(ID),
RECIPE_ID INTEGER NOT NULL REFERENCES recipe(ID),
CHARGE NUMERIC,
SPEED NUMERIC,
PRIMARY KEY(SUBSTR_ID, RECIPE_ID)
);
CREATE TABLE solution(
ID INTEGER PRIMARY KEY,
CHAMBER_ID INTEGER NOT NULL REFERENCES chamber(ID),
NAME TEXT,
TAG TEXT,
DISP_VOL1 NUMERIC,
DISP_TIME1 NUMERIC,
DISP_VOL2 NUMERIC,
DISP_TIME2 NUMERIC,
SB_VOL NUMERIC,
SB_TIME NUMERIC,
SB_DELAY NUMERIC,
RECHG_TIME NUMERIC,
PRE_DISP_VOL NUMERIC,
PRE_DISP_TIME NUMERIC,
PRE_DISP_DELAY NUMERIC,
DISP_CAL_VOL NUMERIC,
PRE_DISP_CAL_VOL NUMERIC
);
CREATE TABLE spin(
ID INTEGER PRIMARY KEY,
CHAMBER_ID INTEGER NOT NULL REFERENCES chamber(ID),
NAME TEXT,
TAG TEXT,
HEIGHT NUMERIC,
SPEED NUMERIC,
ACCEL NUMERIC,
DIR NUMERIC
);
CREATE TABLE substrate(
ID INTEGER PRIMARY KEY,
CHAMBER_ID INTEGER NOT NULL REFERENCES chamber(ID),
NAME TEXT,
TAG TEXT,
CHARGE NUMERIC,
SPEED NUMERIC
);