개정판 393a0fb4
issue #000 : Sql 파일 하나로 통합
Change-Id: I5df6c641f289d5049bfd8ee21cb48d5c22228a73
HYTOS/HYTOS/Scripts/Components.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS Components ( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
Drawings_UID TEXT NOT NULL, |
|
4 |
Symbols_UID TEXT NOT NULL, |
|
5 |
Name TEXT, |
|
6 |
X REAL, |
|
7 |
Y REAL, |
|
8 |
Rotation REAL, |
|
9 |
Scale REAL DEFAULT (1), |
|
10 |
CONSTRAINT PK_Components PRIMARY KEY ( |
|
11 |
UID |
|
12 |
), |
|
13 |
CONSTRAINT FK_Drawings_UID FOREIGN KEY ( |
|
14 |
Drawings_UID |
|
15 |
) |
|
16 |
REFERENCES Drawings (UID), |
|
17 |
CONSTRAINT FK_Symbols_UID FOREIGN KEY ( |
|
18 |
Symbols_UID |
|
19 |
) |
|
20 |
REFERENCES Symbols (UID) |
|
21 |
); |
HYTOS/HYTOS/Scripts/Configuration.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS Configuration ( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
Section TEXT NOT NULL, |
|
4 |
[Key] TEXT NOT NULL, |
|
5 |
Value TEXT NOT NULL, |
|
6 |
CONSTRAINT PK_Configuration PRIMARY KEY ( |
|
7 |
UID |
|
8 |
), |
|
9 |
CONSTRAINT UQ_Configuration UNIQUE ( |
|
10 |
Section, |
|
11 |
[Key] |
|
12 |
) |
|
13 |
); |
HYTOS/HYTOS/Scripts/CreateTables.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS Components ( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
Drawings_UID TEXT NOT NULL, |
|
4 |
Symbols_UID TEXT NOT NULL, |
|
5 |
Name TEXT, |
|
6 |
X REAL, |
|
7 |
Y REAL, |
|
8 |
Rotation REAL, |
|
9 |
Scale REAL DEFAULT (1), |
|
10 |
CONSTRAINT PK_Components PRIMARY KEY ( |
|
11 |
UID |
|
12 |
), |
|
13 |
CONSTRAINT FK_Drawings_UID FOREIGN KEY ( |
|
14 |
Drawings_UID |
|
15 |
) |
|
16 |
REFERENCES Drawings (UID), |
|
17 |
CONSTRAINT FK_Symbols_UID FOREIGN KEY ( |
|
18 |
Symbols_UID |
|
19 |
) |
|
20 |
REFERENCES Symbols (UID) |
|
21 |
); |
|
22 |
|
|
23 |
CREATE TABLE IF NOT EXISTS Configuration ( |
|
24 |
UID TEXT NOT NULL, |
|
25 |
Section TEXT NOT NULL, |
|
26 |
[Key] TEXT NOT NULL, |
|
27 |
Value TEXT NOT NULL, |
|
28 |
CONSTRAINT PK_Configuration PRIMARY KEY ( |
|
29 |
UID |
|
30 |
), |
|
31 |
CONSTRAINT UQ_Configuration UNIQUE ( |
|
32 |
Section, |
|
33 |
[Key] |
|
34 |
) |
|
35 |
); |
|
36 |
|
|
37 |
CREATE TABLE IF NOT EXISTS DisplayNames ( |
|
38 |
UID TEXT NOT NULL, |
|
39 |
TABLE_NAME TEXT NOT NULL, |
|
40 |
COLUMN_NAME TEXT NOT NULL, |
|
41 |
DISPLAY_NAME TEXT, |
|
42 |
[Order] INTEGER NOT NULL, |
|
43 |
CONSTRAINT PK_DisplayNames PRIMARY KEY ( |
|
44 |
UID |
|
45 |
), |
|
46 |
CONSTRAINT UQ_DisplayNames UNIQUE ( |
|
47 |
TABLE_NAME, |
|
48 |
COLUMN_NAME, |
|
49 |
[Order] |
|
50 |
) |
|
51 |
); |
|
52 |
|
|
53 |
CREATE TABLE IF NOT EXISTS Drawings ( |
|
54 |
UID TEXT NOT NULL, |
|
55 |
NAME TEXT NOT NULL, |
|
56 |
DATETIME TEXT NOT NULL, |
|
57 |
CONSTRAINT PK_Drawings PRIMARY KEY ( |
|
58 |
UID |
|
59 |
), |
|
60 |
CONSTRAINT UQ_Drawings UNIQUE ( |
|
61 |
NAME |
|
62 |
) |
|
63 |
); |
|
64 |
|
|
65 |
CREATE TABLE IF NOT EXISTS DrawingsUnits ( |
|
66 |
UID TEXT NOT NULL, |
|
67 |
Drawings_UID TEXT NOT NULL, |
|
68 |
Table_Name TEXT NOT NULL, |
|
69 |
Column_Name TEXT NOT NULL, |
|
70 |
Units_UID TEXT, |
|
71 |
CONSTRAINT PK_DrawingsUnits PRIMARY KEY ( |
|
72 |
UID |
|
73 |
), |
|
74 |
CONSTRAINT FK_Drawings_UID FOREIGN KEY ( |
|
75 |
Drawings_UID |
|
76 |
) |
|
77 |
REFERENCES Drawings (UID), |
|
78 |
CONSTRAINT FK_Units_UID FOREIGN KEY ( |
|
79 |
Units_UID |
|
80 |
) |
|
81 |
REFERENCES Units (UID) |
|
82 |
); |
|
83 |
|
|
84 |
|
|
85 |
CREATE TABLE IF NOT EXISTS Fittings_2K ( |
|
86 |
UID TEXT NOT NULL, |
|
87 |
Components_UID TEXT NOT NULL, |
|
88 |
[90_Elbow_Standard_Screw] INTEGER, |
|
89 |
[90_Elbow_Standard_Flange_Weld] INTEGER, |
|
90 |
[90_Elbow_Long_Radius_All] INTEGER, |
|
91 |
[90_Elbow_1_Weld] INTEGER, |
|
92 |
[90_Elbow_2_Weld] INTEGER, |
|
93 |
[90_Elbow_3_Weld] INTEGER, |
|
94 |
[90_Elbow_4_Weld] INTEGER, |
|
95 |
[90_Elbow_5_Weld] INTEGER, |
|
96 |
[45_Elbow_Standard_All] INTEGER, |
|
97 |
[45_Elbow_Long_Radius_All] INTEGER, |
|
98 |
[45_Elbow_1_Weld] INTEGER, |
|
99 |
[45_Elbow_2_Weld] INTEGER, |
|
100 |
[180_Elbow_Standard_Screw] INTEGER, |
|
101 |
[180_Elbow_Standard_Flange_Weld] INTEGER, |
|
102 |
[180_Elbow_Long_Radius_All] INTEGER, |
|
103 |
Tee_Elbow_Standard_Screw INTEGER, |
|
104 |
Tee_Elbow_Long_Radius_Screw INTEGER, |
|
105 |
Tee_Elbow_Standard_Flange_Weld INTEGER, |
|
106 |
Tee_Elbow_Stub_In_Branch INTEGER, |
|
107 |
Tee_Through_Screw INTEGER, |
|
108 |
Tee_Through_Flange_Weld INTEGER, |
|
109 |
Tee_Through_Stub_In_Branch INTEGER, |
|
110 |
Gate_Ball_Plug_Valve_Full INTEGER, |
|
111 |
[Gate_Ball_Plug_Valve_Reduce_Trim_0.9] INTEGER, |
|
112 |
[Gate_Ball_Plug_Valve_Reduce_Trim_0.8] INTEGER, |
|
113 |
Globe_Valve_Standard INTEGER, |
|
114 |
Globe_Valve_Angle_YType INTEGER, |
|
115 |
Diaphragm_Dam_Valve INTEGER, |
|
116 |
Butterfly_Valve INTEGER, |
|
117 |
Check_Valve_Lift INTEGER, |
|
118 |
Check_Valve_Swing INTEGER, |
|
119 |
Check_Valve_Tilting INTEGER, |
|
120 |
Pipe_Entrance_Normal INTEGER, |
|
121 |
Pipe_Entrance_Borda INTEGER, |
|
122 |
Pipe_Exit INTEGER, |
|
123 |
Resistance_Coefficiency REAL, |
|
124 |
Calculated_Fitting REAL, |
|
125 |
CONSTRAINT PK_Fittings_2K PRIMARY KEY ( |
|
126 |
UID |
|
127 |
), |
|
128 |
CONSTRAINT FK_Components_UID FOREIGN KEY ( |
|
129 |
Components_UID |
|
130 |
) |
|
131 |
REFERENCES Components (UID) |
|
132 |
); |
|
133 |
|
|
134 |
CREATE TABLE IF NOT EXISTS Fittings_CraneK ( |
|
135 |
UID TEXT NOT NULL, |
|
136 |
Components_UID TEXT NOT NULL, |
|
137 |
[90_Elbow_Standard_Screw] INTEGER, |
|
138 |
[90_Elbow_Long_Radius_1] INTEGER, |
|
139 |
[90_Elbow_Long_Radius_1.5] INTEGER, |
|
140 |
[90_Elbow_Long_Radius_2] INTEGER, |
|
141 |
[90_Elbow_Long_Radius_3] INTEGER, |
|
142 |
[90_Elbow_Long_Radius_4] INTEGER, |
|
143 |
[90_Elbow_Long_Radius_6] INTEGER, |
|
144 |
[90_Elbow_Long_Radius_8] INTEGER, |
|
145 |
[90_Elbow_Long_Radius_10] INTEGER, |
|
146 |
[90_Elbow_Long_Radius_12] INTEGER, |
|
147 |
[90_Elbow_Long_Radius_14] INTEGER, |
|
148 |
[90_Elbow_Long_Radius_16] INTEGER, |
|
149 |
[90_Elbow_Long_Radius_20] INTEGER, |
|
150 |
[90_Elbow_1_Weld] INTEGER, |
|
151 |
[90_Elbow_2_Weld] INTEGER, |
|
152 |
[90_Elbow_3_Weld] INTEGER, |
|
153 |
[90_Elbow_6_Weld] INTEGER, |
|
154 |
[45_Elbow_Standard_Screw] INTEGER, |
|
155 |
[45_Elbow_1_Weld] INTEGER, |
|
156 |
[45_Elbow_3_Weld] INTEGER, |
|
157 |
[180_Elbow_Standard_Screw] INTEGER, |
|
158 |
[180_Elbow_Long_Radius_1] INTEGER, |
|
159 |
[180_Elbow_Long_Radius_1.5] INTEGER, |
|
160 |
[180_Elbow_Long_Radius_2] INTEGER, |
|
161 |
[180_Elbow_Long_Radius_3] INTEGER, |
|
162 |
[180_Elbow_Long_Radius_4] INTEGER, |
|
163 |
[180_Elbow_Long_Radius_6] INTEGER, |
|
164 |
[180_Elbow_Long_Radius_8] INTEGER, |
|
165 |
[180_Elbow_Long_Radius_10] INTEGER, |
|
166 |
[180_Elbow_Long_Radius_12] INTEGER, |
|
167 |
[180_Elbow_Long_Radius_14] INTEGER, |
|
168 |
[180_Elbow_Long_Radius_16] INTEGER, |
|
169 |
[180_Elbow_Long_Radius_20] INTEGER, |
|
170 |
[180_Elbow_2_Weld] INTEGER, |
|
171 |
[180_Elbow_3_Weld] INTEGER, |
|
172 |
[180_Elbow_4_Weld] INTEGER, |
|
173 |
[180_Elbow_6_Weld] INTEGER, |
|
174 |
[180_Elbow_12_Weld] INTEGER, |
|
175 |
Tee_Through INTEGER, |
|
176 |
Tee_Elbow INTEGER, |
|
177 |
Expander INTEGER, |
|
178 |
Reducer INTEGER, |
|
179 |
Globe_Valve_Standard INTEGER, |
|
180 |
Globe_Valve_45_Angle INTEGER, |
|
181 |
Globe_Valve_90_Angle INTEGER, |
|
182 |
Plug_Valve_1_Way INTEGER, |
|
183 |
Plug_Valve_3_Way_Through INTEGER, |
|
184 |
Plug_Valve_3_Way_Elbow INTEGER, |
|
185 |
Foot_Valve_Poppet_Disc INTEGER, |
|
186 |
Foot_Valve_Hinged_Disc INTEGER, |
|
187 |
Gate_Valve INTEGER, |
|
188 |
Ball_Valve INTEGER, |
|
189 |
Butterfly_Valve INTEGER, |
|
190 |
Pipe_Enterance_Projecting INTEGER, |
|
191 |
[Pipe_Enterance_Flush_0.00] INTEGER, |
|
192 |
[Pipe_Enterance_Flush_0.02] INTEGER, |
|
193 |
[Pipe_Enterance_Flush_0.04] INTEGER, |
|
194 |
[Pipe_Enterance_Flush_0.06] INTEGER, |
|
195 |
[Pipe_Enterance_Flush_0.10] INTEGER, |
|
196 |
[Pipe_Enterance_Flush_0.15] INTEGER, |
|
197 |
Pipe_Exit_Projecting INTEGER, |
|
198 |
Pipe_Exit_Sharp_Edged INTEGER, |
|
199 |
Pipe_Exit_Rounded INTEGER, |
|
200 |
Check_Valve_Swing_Vertical INTEGER, |
|
201 |
Check_Valve_Swing_Angled INTEGER, |
|
202 |
Check_Valve_Lift_Straight INTEGER, |
|
203 |
Check_Valve_Lift_Angled INTEGER, |
|
204 |
[Check_Valve_Tilting_Alpha_5] INTEGER, |
|
205 |
[Check_Valve_Tilting_Alpha_15] INTEGER, |
|
206 |
Check_Valve_Globe_Stop INTEGER, |
|
207 |
Check_Valve_Globe_Stop_45_Angle INTEGER, |
|
208 |
Check_Valve_Globe_Stop_Inline INTEGER, |
|
209 |
Check_Valve_Angled_Stop INTEGER, |
|
210 |
Check_Valve_Angled_Stop_45_Angle INTEGER, |
|
211 |
Check_Valve_Angled_Stop_Inline INTEGER, |
|
212 |
User_Input INTEGER, |
|
213 |
Resistance_Coefficiency REAL, |
|
214 |
Calculated_Fitting REAL, |
|
215 |
CONSTRAINT PK_Fittings_CraneK PRIMARY KEY ( |
|
216 |
UID |
|
217 |
), |
|
218 |
CONSTRAINT FK_Components_UID FOREIGN KEY ( |
|
219 |
Components_UID |
|
220 |
) |
|
221 |
REFERENCES Components (UID) |
|
222 |
); |
|
223 |
|
|
224 |
CREATE TABLE IF NOT EXISTS Fittings_EquivalentLength ( |
|
225 |
UID TEXT NOT NULL, |
|
226 |
Components_UID TEXT NOT NULL, |
|
227 |
Gate_Ball_Plug_Valve INTEGER, |
|
228 |
Globe_Valve INTEGER, |
|
229 |
Butterfly_Valve INTEGER, |
|
230 |
Check_Valve INTEGER, |
|
231 |
[90_Elbow] INTEGER, |
|
232 |
[45_Elbo] INTEGER, |
|
233 |
Tee_Branch INTEGER, |
|
234 |
Tee_Through INTEGER, |
|
235 |
Milter INTEGER, |
|
236 |
Milter_Degree INTEGER, |
|
237 |
Nozzle_In_YN BOOLEAN, |
|
238 |
Nozzle_Out_YN BOOLEAN, |
|
239 |
Calculated_Fitting REAL, |
|
240 |
CONSTRAINT PK_Fittings_EquivalentLength PRIMARY KEY ( |
|
241 |
UID |
|
242 |
), |
|
243 |
CONSTRAINT FK_Components_UID FOREIGN KEY ( |
|
244 |
Components_UID |
|
245 |
) |
|
246 |
REFERENCES Components (UID) |
|
247 |
); |
|
248 |
|
|
249 |
CREATE TABLE IF NOT EXISTS HMB ( |
|
250 |
UID TEXT NOT NULL, |
|
251 |
Components_UID TEXT NOT NULL, |
|
252 |
Stream_No INTEGER NOT NULL, |
|
253 |
Phase_Type TEXT, |
|
254 |
Flowrate_Mass REAL, |
|
255 |
Flowrate_Volume REAL, |
|
256 |
Density REAL, |
|
257 |
Viscosity REAL, |
|
258 |
Temperature REAL, |
|
259 |
Molecular_Weight REAL, |
|
260 |
Specific_Heat_Ratio REAL, |
|
261 |
Compress_Factor REAL, |
|
262 |
Nominal_Pipe_Size REAL, |
|
263 |
Inside_Pipe_Size REAL, |
|
264 |
Schedul_No TEXT, |
|
265 |
Straight_Length REAL, |
|
266 |
Equivalent_Length REAL, |
|
267 |
Roughness REAL, |
|
268 |
Limitation_Velocity REAL, |
|
269 |
Limitation_Pressure_Drop REAL, |
|
270 |
Velocity REAL, |
|
271 |
Reynolds REAL, |
|
272 |
Friction_Factor REAL, |
|
273 |
Pressure_Drop REAL, |
|
274 |
Pressure_Drop_Friction REAL, |
|
275 |
Pressure_Drop_Static REAL, |
|
276 |
Pressure_Pipe_End_Point REAL, |
|
277 |
Power REAL, |
|
278 |
CONSTRAINT PK_HMB PRIMARY KEY ( |
|
279 |
UID |
|
280 |
), |
|
281 |
CONSTRAINT FK_Components_UID FOREIGN KEY ( |
|
282 |
Components_UID |
|
283 |
) |
|
284 |
REFERENCES Components (UID), |
|
285 |
CONSTRAINT UQ_HMB UNIQUE ( |
|
286 |
Components_UID, |
|
287 |
Stream_No |
|
288 |
) |
|
289 |
); |
|
290 |
|
|
291 |
CREATE TABLE IF NOT EXISTS Loops ( |
|
292 |
UID TEXT NOT NULL, |
|
293 |
Name TEXT NOT NULL, |
|
294 |
From_Nozzles_UID TEXT NOT NULL, |
|
295 |
Stream_No INTEGER NOT NULL, |
|
296 |
To_Nozzles_UID TEXT NOT NULL, |
|
297 |
CONSTRAINT PK_Loops PRIMARY KEY ( |
|
298 |
UID |
|
299 |
), |
|
300 |
CONSTRAINT FK_From_Nozzles_UID FOREIGN KEY ( |
|
301 |
From_Nozzles_UID |
|
302 |
) |
|
303 |
REFERENCES Nozzles (UID), |
|
304 |
CONSTRAINT FK_Stream_No FOREIGN KEY ( |
|
305 |
Stream_No |
|
306 |
) |
|
307 |
REFERENCES HMB (Stream_No), |
|
308 |
CONSTRAINT FK_To_Nozzles_UID FOREIGN KEY ( |
|
309 |
To_Nozzles_UID |
|
310 |
) |
|
311 |
REFERENCES Nozzles (UID) |
|
312 |
); |
|
313 |
|
|
314 |
CREATE TABLE IF NOT EXISTS NominalDiameter ( |
|
315 |
UID TEXT NOT NULL, |
|
316 |
Milimeter REAL NOT NULL, |
|
317 |
Inch REAL NOT NULL, |
|
318 |
CONSTRAINT PK_NominalDiameter PRIMARY KEY ( |
|
319 |
UID |
|
320 |
) |
|
321 |
); |
|
322 |
|
|
323 |
CREATE TABLE IF NOT EXISTS Nozzles ( |
|
324 |
UID TEXT NOT NULL, |
|
325 |
Points_UID TEXT NOT NULL, |
|
326 |
Pressure REAL, |
|
327 |
Pressure_Drop REAL, |
|
328 |
Elevation REAL, |
|
329 |
Over_Design_CV REAL, |
|
330 |
CV_Type TEXT, |
|
331 |
Total_Discharge_Loss REAL, |
|
332 |
Total_Suction_Loass REAL, |
|
333 |
Total_Loss REAL, |
|
334 |
Discharge_Device_Loss REAL, |
|
335 |
Suction_Device_Loss REAL, |
|
336 |
Total_Device_Loss REAL, |
|
337 |
Discharge_Line_Friction_Loss REAL, |
|
338 |
Suction_Line_Friction_Loss REAL, |
|
339 |
Line_Total_Frictoin_Loss REAL, |
|
340 |
CONSTRAINT PK_Nozzles PRIMARY KEY ( |
|
341 |
UID |
|
342 |
), |
|
343 |
CONSTRAINT FK_Points_UID FOREIGN KEY ( |
|
344 |
Points_UID |
|
345 |
) |
|
346 |
REFERENCES Points (UID) |
|
347 |
); |
|
348 |
|
|
349 |
CREATE TABLE IF NOT EXISTS Points ( |
|
350 |
UID TEXT NOT NULL, |
|
351 |
Components_UID TEXT NOT NULL, |
|
352 |
[Index] INTEGER NOT NULL, |
|
353 |
X REAL NOT NULL, |
|
354 |
Y REAL NOT NULL, |
|
355 |
ConnectedItem_UID TEXT, |
|
356 |
CONSTRAINT PK_Points PRIMARY KEY ( |
|
357 |
UID |
|
358 |
), |
|
359 |
CONSTRAINT FK_Components_UID FOREIGN KEY ( |
|
360 |
Components_UID |
|
361 |
) |
|
362 |
REFERENCES Components (UID) |
|
363 |
); |
|
364 |
|
|
365 |
CREATE TABLE IF NOT EXISTS Roughness ( |
|
366 |
UID TEXT NOT NULL, |
|
367 |
Material TEXT NOT NULL, |
|
368 |
Meter REAL NOT NULL, |
|
369 |
Inch REAL NOT NULL, |
|
370 |
Feet REAL NOT NULL, |
|
371 |
Milimeter REAL NOT NULL, |
|
372 |
CONSTRAINT PK_Roughness PRIMARY KEY ( |
|
373 |
UID |
|
374 |
), |
|
375 |
CONSTRAINT UQ_Roughness UNIQUE ( |
|
376 |
Material |
|
377 |
) |
|
378 |
); |
|
379 |
|
|
380 |
CREATE TABLE IF NOT EXISTS Symbols ( |
|
381 |
UID TEXT NOT NULL, |
|
382 |
Name TEXT NOT NULL, |
|
383 |
SymbolType_UID TEXT NOT NULL, |
|
384 |
OriginalPoint TEXT NOT NULL, |
|
385 |
ConnectionPoint TEXT, |
|
386 |
CONSTRAINT PK_Symbols PRIMARY KEY ( |
|
387 |
UID |
|
388 |
), |
|
389 |
CONSTRAINT FK_SymbolType_UID FOREIGN KEY ( |
|
390 |
SymbolType_UID |
|
391 |
) |
|
392 |
REFERENCES SymbolType (UID) |
|
393 |
); |
|
394 |
|
|
395 |
CREATE TABLE IF NOT EXISTS SymbolType( |
|
396 |
UID TEXT NOT NULL, |
|
397 |
Category TEXT NOT NULL, |
|
398 |
Type TEXT NOT NULL, |
|
399 |
CONSTRAINT PK_SymbolType PRIMARY KEY ( |
|
400 |
UID |
|
401 |
), |
|
402 |
CONSTRAINT UQ_SymbolType UNIQUE ( |
|
403 |
Category, |
|
404 |
Type |
|
405 |
) |
|
406 |
); |
|
407 |
|
|
408 |
CREATE TABLE IF NOT EXISTS Units ( |
|
409 |
UID TEXT NOT NULL, |
|
410 |
TABLE_NAME TEXT NOT NULL, |
|
411 |
COLUMN_NAME TEXT NOT NULL, |
|
412 |
UNIT TEXT NOT NULL, |
|
413 |
CONSTRAINT PK_Units PRIMARY KEY ( |
|
414 |
UID |
|
415 |
), |
|
416 |
CONSTRAINT UQ_Units UNIQUE ( |
|
417 |
TABLE_NAME, |
|
418 |
COLUMN_NAME, |
|
419 |
UNIT |
|
420 |
) |
|
421 |
); |
|
422 |
|
|
423 |
|
HYTOS/HYTOS/Scripts/Drawings.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS Drawings ( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
NAME TEXT NOT NULL, |
|
4 |
DATETIME TEXT NOT NULL, |
|
5 |
CONSTRAINT PK_Drawings PRIMARY KEY ( |
|
6 |
UID |
|
7 |
), |
|
8 |
CONSTRAINT UQ_Drawings UNIQUE ( |
|
9 |
NAME |
|
10 |
) |
|
11 |
); |
HYTOS/HYTOS/Scripts/DrawingsUnits.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS DrawingsUnits ( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
Drawings_UID TEXT NOT NULL, |
|
4 |
Table_Name TEXT NOT NULL, |
|
5 |
Column_Name TEXT NOT NULL, |
|
6 |
Units_UID TEXT, |
|
7 |
CONSTRAINT PK_DrawingsUnits PRIMARY KEY ( |
|
8 |
UID |
|
9 |
), |
|
10 |
CONSTRAINT FK_Drawings_UID FOREIGN KEY ( |
|
11 |
Drawings_UID |
|
12 |
) |
|
13 |
REFERENCES Drawings (UID), |
|
14 |
CONSTRAINT FK_Units_UID FOREIGN KEY ( |
|
15 |
Units_UID |
|
16 |
) |
|
17 |
REFERENCES Units (UID) |
|
18 |
); |
HYTOS/HYTOS/Scripts/Fittings_2K.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS Fittings_2K ( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
Components_UID TEXT NOT NULL, |
|
4 |
[90_Elbow_Standard_Screw] INTEGER, |
|
5 |
[90_Elbow_Standard_Flange_Weld] INTEGER, |
|
6 |
[90_Elbow_Long_Radius_All] INTEGER, |
|
7 |
[90_Elbow_1_Weld] INTEGER, |
|
8 |
[90_Elbow_2_Weld] INTEGER, |
|
9 |
[90_Elbow_3_Weld] INTEGER, |
|
10 |
[90_Elbow_4_Weld] INTEGER, |
|
11 |
[90_Elbow_5_Weld] INTEGER, |
|
12 |
[45_Elbow_Standard_All] INTEGER, |
|
13 |
[45_Elbow_Long_Radius_All] INTEGER, |
|
14 |
[45_Elbow_1_Weld] INTEGER, |
|
15 |
[45_Elbow_2_Weld] INTEGER, |
|
16 |
[180_Elbow_Standard_Screw] INTEGER, |
|
17 |
[180_Elbow_Standard_Flange_Weld] INTEGER, |
|
18 |
[180_Elbow_Long_Radius_All] INTEGER, |
|
19 |
Tee_Elbow_Standard_Screw INTEGER, |
|
20 |
Tee_Elbow_Long_Radius_Screw INTEGER, |
|
21 |
Tee_Elbow_Standard_Flange_Weld INTEGER, |
|
22 |
Tee_Elbow_Stub_In_Branch INTEGER, |
|
23 |
Tee_Through_Screw INTEGER, |
|
24 |
Tee_Through_Flange_Weld INTEGER, |
|
25 |
Tee_Through_Stub_In_Branch INTEGER, |
|
26 |
Gate_Ball_Plug_Valve_Full INTEGER, |
|
27 |
[Gate_Ball_Plug_Valve_Reduce_Trim_0.9] INTEGER, |
|
28 |
[Gate_Ball_Plug_Valve_Reduce_Trim_0.8] INTEGER, |
|
29 |
Globe_Valve_Standard INTEGER, |
|
30 |
Globe_Valve_Angle_YType INTEGER, |
|
31 |
Diaphragm_Dam_Valve INTEGER, |
|
32 |
Butterfly_Valve INTEGER, |
|
33 |
Check_Valve_Lift INTEGER, |
|
34 |
Check_Valve_Swing INTEGER, |
|
35 |
Check_Valve_Tilting INTEGER, |
|
36 |
Pipe_Entrance_Normal INTEGER, |
|
37 |
Pipe_Entrance_Borda INTEGER, |
|
38 |
Pipe_Exit INTEGER, |
|
39 |
Resistance_Coefficiency REAL, |
|
40 |
Calculated_Fitting REAL, |
|
41 |
CONSTRAINT PK_Fittings_2K PRIMARY KEY ( |
|
42 |
UID |
|
43 |
), |
|
44 |
CONSTRAINT FK_Components_UID FOREIGN KEY ( |
|
45 |
Components_UID |
|
46 |
) |
|
47 |
REFERENCES Components (UID) |
|
48 |
); |
HYTOS/HYTOS/Scripts/Fittings_CraneK.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS Fittings_CraneK ( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
Components_UID TEXT NOT NULL, |
|
4 |
[90_Elbow_Standard_Screw] INTEGER, |
|
5 |
[90_Elbow_Long_Radius_1] INTEGER, |
|
6 |
[90_Elbow_Long_Radius_1.5] INTEGER, |
|
7 |
[90_Elbow_Long_Radius_2] INTEGER, |
|
8 |
[90_Elbow_Long_Radius_3] INTEGER, |
|
9 |
[90_Elbow_Long_Radius_4] INTEGER, |
|
10 |
[90_Elbow_Long_Radius_6] INTEGER, |
|
11 |
[90_Elbow_Long_Radius_8] INTEGER, |
|
12 |
[90_Elbow_Long_Radius_10] INTEGER, |
|
13 |
[90_Elbow_Long_Radius_12] INTEGER, |
|
14 |
[90_Elbow_Long_Radius_14] INTEGER, |
|
15 |
[90_Elbow_Long_Radius_16] INTEGER, |
|
16 |
[90_Elbow_Long_Radius_20] INTEGER, |
|
17 |
[90_Elbow_1_Weld] INTEGER, |
|
18 |
[90_Elbow_2_Weld] INTEGER, |
|
19 |
[90_Elbow_3_Weld] INTEGER, |
|
20 |
[90_Elbow_6_Weld] INTEGER, |
|
21 |
[45_Elbow_Standard_Screw] INTEGER, |
|
22 |
[45_Elbow_1_Weld] INTEGER, |
|
23 |
[45_Elbow_3_Weld] INTEGER, |
|
24 |
[180_Elbow_Standard_Screw] INTEGER, |
|
25 |
[180_Elbow_Long_Radius_1] INTEGER, |
|
26 |
[180_Elbow_Long_Radius_1.5] INTEGER, |
|
27 |
[180_Elbow_Long_Radius_2] INTEGER, |
|
28 |
[180_Elbow_Long_Radius_3] INTEGER, |
|
29 |
[180_Elbow_Long_Radius_4] INTEGER, |
|
30 |
[180_Elbow_Long_Radius_6] INTEGER, |
|
31 |
[180_Elbow_Long_Radius_8] INTEGER, |
|
32 |
[180_Elbow_Long_Radius_10] INTEGER, |
|
33 |
[180_Elbow_Long_Radius_12] INTEGER, |
|
34 |
[180_Elbow_Long_Radius_14] INTEGER, |
|
35 |
[180_Elbow_Long_Radius_16] INTEGER, |
|
36 |
[180_Elbow_Long_Radius_20] INTEGER, |
|
37 |
[180_Elbow_2_Weld] INTEGER, |
|
38 |
[180_Elbow_3_Weld] INTEGER, |
|
39 |
[180_Elbow_4_Weld] INTEGER, |
|
40 |
[180_Elbow_6_Weld] INTEGER, |
|
41 |
[180_Elbow_12_Weld] INTEGER, |
|
42 |
Tee_Through INTEGER, |
|
43 |
Tee_Elbow INTEGER, |
|
44 |
Expander INTEGER, |
|
45 |
Reducer INTEGER, |
|
46 |
Globe_Valve_Standard INTEGER, |
|
47 |
Globe_Valve_45_Angle INTEGER, |
|
48 |
Globe_Valve_90_Angle INTEGER, |
|
49 |
Plug_Valve_1_Way INTEGER, |
|
50 |
Plug_Valve_3_Way_Through INTEGER, |
|
51 |
Plug_Valve_3_Way_Elbow INTEGER, |
|
52 |
Foot_Valve_Poppet_Disc INTEGER, |
|
53 |
Foot_Valve_Hinged_Disc INTEGER, |
|
54 |
Gate_Valve INTEGER, |
|
55 |
Ball_Valve INTEGER, |
|
56 |
Butterfly_Valve INTEGER, |
|
57 |
Pipe_Enterance_Projecting INTEGER, |
|
58 |
[Pipe_Enterance_Flush_0.00] INTEGER, |
|
59 |
[Pipe_Enterance_Flush_0.02] INTEGER, |
|
60 |
[Pipe_Enterance_Flush_0.04] INTEGER, |
|
61 |
[Pipe_Enterance_Flush_0.06] INTEGER, |
|
62 |
[Pipe_Enterance_Flush_0.10] INTEGER, |
|
63 |
[Pipe_Enterance_Flush_0.15] INTEGER, |
|
64 |
Pipe_Exit_Projecting INTEGER, |
|
65 |
Pipe_Exit_Sharp_Edged INTEGER, |
|
66 |
Pipe_Exit_Rounded INTEGER, |
|
67 |
Check_Valve_Swing_Vertical INTEGER, |
|
68 |
Check_Valve_Swing_Angled INTEGER, |
|
69 |
Check_Valve_Lift_Straight INTEGER, |
|
70 |
Check_Valve_Lift_Angled INTEGER, |
|
71 |
[Check_Valve_Tilting_Alpha_5] INTEGER, |
|
72 |
[Check_Valve_Tilting_Alpha_15] INTEGER, |
|
73 |
Check_Valve_Globe_Stop INTEGER, |
|
74 |
Check_Valve_Globe_Stop_45_Angle INTEGER, |
|
75 |
Check_Valve_Globe_Stop_Inline INTEGER, |
|
76 |
Check_Valve_Angled_Stop INTEGER, |
|
77 |
Check_Valve_Angled_Stop_45_Angle INTEGER, |
|
78 |
Check_Valve_Angled_Stop_Inline INTEGER, |
|
79 |
User_Input INTEGER, |
|
80 |
Resistance_Coefficiency REAL, |
|
81 |
Calculated_Fitting REAL, |
|
82 |
CONSTRAINT PK_Fittings_CraneK PRIMARY KEY ( |
|
83 |
UID |
|
84 |
), |
|
85 |
CONSTRAINT FK_Components_UID FOREIGN KEY ( |
|
86 |
Components_UID |
|
87 |
) |
|
88 |
REFERENCES Components (UID) |
|
89 |
); |
HYTOS/HYTOS/Scripts/Fittings_EquivalentLength.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS Fittings_EquivalentLength ( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
Components_UID TEXT NOT NULL, |
|
4 |
Gate_Ball_Plug_Valve INTEGER, |
|
5 |
Globe_Valve INTEGER, |
|
6 |
Butterfly_Valve INTEGER, |
|
7 |
Check_Valve INTEGER, |
|
8 |
[90_Elbow] INTEGER, |
|
9 |
[45_Elbo] INTEGER, |
|
10 |
Tee_Branch INTEGER, |
|
11 |
Tee_Through INTEGER, |
|
12 |
Milter INTEGER, |
|
13 |
Milter_Degree INTEGER, |
|
14 |
Nozzle_In_YN BOOLEAN, |
|
15 |
Nozzle_Out_YN BOOLEAN, |
|
16 |
Calculated_Fitting REAL, |
|
17 |
CONSTRAINT PK_Fittings_EquivalentLength PRIMARY KEY ( |
|
18 |
UID |
|
19 |
), |
|
20 |
CONSTRAINT FK_Components_UID FOREIGN KEY ( |
|
21 |
Components_UID |
|
22 |
) |
|
23 |
REFERENCES Components (UID) |
|
24 |
); |
HYTOS/HYTOS/Scripts/HMB.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS HMB ( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
Components_UID TEXT NOT NULL, |
|
4 |
Stream_No INTEGER NOT NULL, |
|
5 |
Phase_Type TEXT, |
|
6 |
Flowrate_Mass REAL, |
|
7 |
Flowrate_Volume REAL, |
|
8 |
Density REAL, |
|
9 |
Viscosity REAL, |
|
10 |
Temperature REAL, |
|
11 |
Molecular_Weight REAL, |
|
12 |
Specific_Heat_Ratio REAL, |
|
13 |
Compress_Factor REAL, |
|
14 |
Nominal_Pipe_Size REAL, |
|
15 |
Inside_Pipe_Size REAL, |
|
16 |
Schedul_No TEXT, |
|
17 |
Straight_Length REAL, |
|
18 |
Equivalent_Length REAL, |
|
19 |
Roughness REAL, |
|
20 |
Limitation_Velocity REAL, |
|
21 |
Limitation_Pressure_Drop REAL, |
|
22 |
Velocity REAL, |
|
23 |
Reynolds REAL, |
|
24 |
Friction_Factor REAL, |
|
25 |
Pressure_Drop REAL, |
|
26 |
Pressure_Drop_Friction REAL, |
|
27 |
Pressure_Drop_Static REAL, |
|
28 |
Pressure_Pipe_End_Point REAL, |
|
29 |
Power REAL, |
|
30 |
CONSTRAINT PK_HMB PRIMARY KEY ( |
|
31 |
UID |
|
32 |
), |
|
33 |
CONSTRAINT FK_Components_UID FOREIGN KEY ( |
|
34 |
Components_UID |
|
35 |
) |
|
36 |
REFERENCES Components (UID), |
|
37 |
CONSTRAINT UQ_HMB UNIQUE ( |
|
38 |
Components_UID, |
|
39 |
Stream_No |
|
40 |
) |
|
41 |
); |
HYTOS/HYTOS/Scripts/Loops.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS Loops ( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
Name TEXT NOT NULL, |
|
4 |
From_Nozzles_UID TEXT NOT NULL, |
|
5 |
Stream_No INTEGER NOT NULL, |
|
6 |
To_Nozzles_UID TEXT NOT NULL, |
|
7 |
CONSTRAINT PK_Loops PRIMARY KEY ( |
|
8 |
UID |
|
9 |
), |
|
10 |
CONSTRAINT FK_From_Nozzles_UID FOREIGN KEY ( |
|
11 |
From_Nozzles_UID |
|
12 |
) |
|
13 |
REFERENCES Nozzles (UID), |
|
14 |
CONSTRAINT FK_Stream_No FOREIGN KEY ( |
|
15 |
Stream_No |
|
16 |
) |
|
17 |
REFERENCES HMB (Stream_No), |
|
18 |
CONSTRAINT FK_To_Nozzles_UID FOREIGN KEY ( |
|
19 |
To_Nozzles_UID |
|
20 |
) |
|
21 |
REFERENCES Nozzles (UID) |
|
22 |
); |
HYTOS/HYTOS/Scripts/NominalDiameter.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS NominalDiameter ( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
Milimeter REAL NOT NULL, |
|
4 |
Inch REAL NOT NULL, |
|
5 |
CONSTRAINT PK_NominalDiameter PRIMARY KEY ( |
|
6 |
UID |
|
7 |
) |
|
8 |
); |
HYTOS/HYTOS/Scripts/Nozzles.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS Nozzles ( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
Points_UID TEXT NOT NULL, |
|
4 |
Pressure REAL, |
|
5 |
Pressure_Drop REAL, |
|
6 |
Elevation REAL, |
|
7 |
Over_Design_CV REAL, |
|
8 |
CV_Type TEXT, |
|
9 |
Total_Discharge_Loss REAL, |
|
10 |
Total_Suction_Loass REAL, |
|
11 |
Total_Loss REAL, |
|
12 |
Discharge_Device_Loss REAL, |
|
13 |
Suction_Device_Loss REAL, |
|
14 |
Total_Device_Loss REAL, |
|
15 |
Discharge_Line_Friction_Loss REAL, |
|
16 |
Suction_Line_Friction_Loss REAL, |
|
17 |
Line_Total_Frictoin_Loss REAL, |
|
18 |
CONSTRAINT PK_Nozzles PRIMARY KEY ( |
|
19 |
UID |
|
20 |
), |
|
21 |
CONSTRAINT FK_Points_UID FOREIGN KEY ( |
|
22 |
Points_UID |
|
23 |
) |
|
24 |
REFERENCES Points (UID) |
|
25 |
); |
HYTOS/HYTOS/Scripts/Points.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS Points ( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
Components_UID TEXT NOT NULL, |
|
4 |
[Index] INTEGER NOT NULL, |
|
5 |
X REAL NOT NULL, |
|
6 |
Y REAL NOT NULL, |
|
7 |
ConnectedItem_UID TEXT, |
|
8 |
CONSTRAINT PK_Points PRIMARY KEY ( |
|
9 |
UID |
|
10 |
), |
|
11 |
CONSTRAINT FK_Components_UID FOREIGN KEY ( |
|
12 |
Components_UID |
|
13 |
) |
|
14 |
REFERENCES Components (UID) |
|
15 |
); |
HYTOS/HYTOS/Scripts/Roughness.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS Roughness ( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
Material TEXT NOT NULL, |
|
4 |
Meter REAL NOT NULL, |
|
5 |
Inch REAL NOT NULL, |
|
6 |
Feet REAL NOT NULL, |
|
7 |
Milimeter REAL NOT NULL, |
|
8 |
CONSTRAINT PK_Roughness PRIMARY KEY ( |
|
9 |
UID |
|
10 |
), |
|
11 |
CONSTRAINT UQ_Roughness UNIQUE ( |
|
12 |
Material |
|
13 |
) |
|
14 |
); |
HYTOS/HYTOS/Scripts/SymbolType.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS SymbolType( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
Category TEXT NOT NULL, |
|
4 |
Type TEXT NOT NULL, |
|
5 |
CONSTRAINT PK_SymbolType PRIMARY KEY ( |
|
6 |
UID |
|
7 |
), |
|
8 |
CONSTRAINT UQ_SymbolType UNIQUE ( |
|
9 |
Category, |
|
10 |
Type |
|
11 |
) |
|
12 |
); |
HYTOS/HYTOS/Scripts/Symbols.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS Symbols ( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
Name TEXT NOT NULL, |
|
4 |
SymbolType_UID TEXT NOT NULL, |
|
5 |
OriginalPoint TEXT NOT NULL, |
|
6 |
ConnectionPoint TEXT, |
|
7 |
CONSTRAINT PK_Symbols PRIMARY KEY ( |
|
8 |
UID |
|
9 |
), |
|
10 |
CONSTRAINT FK_SymbolType_UID FOREIGN KEY ( |
|
11 |
SymbolType_UID |
|
12 |
) |
|
13 |
REFERENCES SymbolType (UID) |
|
14 |
); |
HYTOS/HYTOS/Scripts/Units.sql | ||
---|---|---|
1 |
CREATE TABLE IF NOT EXISTS Units ( |
|
2 |
UID TEXT NOT NULL, |
|
3 |
TABLE_NAME TEXT NOT NULL, |
|
4 |
COLUMN_NAME TEXT NOT NULL, |
|
5 |
UNIT TEXT NOT NULL, |
|
6 |
CONSTRAINT PK_Units PRIMARY KEY ( |
|
7 |
UID |
|
8 |
), |
|
9 |
CONSTRAINT UQ_Units UNIQUE ( |
|
10 |
TABLE_NAME, |
|
11 |
COLUMN_NAME, |
|
12 |
UNIT |
|
13 |
) |
|
14 |
); |
내보내기 Unified diff