/[volute]/trunk/projects/theory/snapdm/output/ddl/postgres/SimDB_create.sql
ViewVC logotype

Contents of /trunk/projects/theory/snapdm/output/ddl/postgres/SimDB_create.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 380 - (show annotations)
Tue May 6 18:38:34 2008 UTC (12 years, 6 months ago) by bourges.laurent
File size: 11179 byte(s)
JPA mapping :
- multiplicity support (nullable = true/false)
- reference translated to jpa mapping (cascade)
- reference subsets support

DBTest creates now a couple Simulation / Simulator 
1 -- last modification date of the UML model 1210095411000
2
3 CREATE TABLE Resource (
4 id bigint not null
5 , DTYPE varchar(32)
6 , name varchar(256)
7 , description varchar(256)
8 , referenceURL varchar(256)
9 , created timestamp
10 , updated timestamp
11 , status varchar(256)
12 );
13
14
15 CREATE VIEW v_Resource AS
16 SELECT * FROM Resource;
17
18
19 CREATE TABLE Curation (
20 id bigint not null
21 , DTYPE varchar(32)
22 , publisher varchar(256) not null
23 , creator varchar(256)
24 , contributor varchar(256)
25 , date timestamp
26 , version varchar(256)
27 , contactId bigint null -- Contact
28 );
29
30
31 CREATE INDEX ix_Curation_contact (contactId);
32
33
34 CREATE FOREIGN KEY fk_Curation_contact (contactId);
35
36
37 CREATE VIEW v_Curation AS
38 SELECT * FROM Curation;
39
40
41 CREATE TABLE Contact (
42 id bigint not null
43 , DTYPE varchar(32)
44 , name varchar(256) not null
45 , address varchar(256)
46 , email varchar(256)
47 , telephone varchar(256)
48 );
49
50
51 CREATE VIEW v_Contact AS
52 SELECT * FROM Contact;
53
54
55 CREATE TABLE Simulation (
56 id bigint not null
57 , executionTime timestamp
58 );
59
60
61 CREATE INDEX ix_Simulation_protocol (protocolId);
62
63
64 CREATE FOREIGN KEY fk_Simulation_protocol (protocolId);
65
66
67 CREATE VIEW v_Simulation AS
68 SELECT * FROM Simulation;
69
70
71 CREATE TABLE Characterisation (
72 id bigint not null
73 , DTYPE varchar(32)
74 , value_value varchar(256) not null
75 , value_unit varchar(32)
76 , type varchar(256) -- CharacterisationType
77 , aPriori bit
78 , axisId bigint not null -- ExperimentProperty
79 );
80
81
82 CREATE INDEX ix_Characterisation_axis (axisId);
83
84
85 CREATE FOREIGN KEY fk_Characterisation_axis (axisId);
86
87
88 CREATE VIEW v_Characterisation AS
89 SELECT * FROM Characterisation;
90
91
92 CREATE TABLE ObjectCollection (
93 id bigint not null
94 , DTYPE varchar(32)
95 , numberOfObjects integer
96 , objectTypeId bigint not null -- ExperimentRepresentationObject
97 );
98
99
100 CREATE INDEX ix_ObjectCollection_objectType (objectTypeId);
101
102
103 CREATE FOREIGN KEY fk_ObjectCollection_objectType (objectTypeId);
104
105
106 CREATE VIEW v_ObjectCollection AS
107 SELECT * FROM ObjectCollection;
108
109
110 CREATE TABLE Experiment (
111 id bigint not null
112 , publisherDID varchar(256)
113 , protocolId bigint not null -- Protocol
114 );
115
116
117 CREATE INDEX ix_Experiment_protocol (protocolId);
118
119
120 CREATE FOREIGN KEY fk_Experiment_protocol (protocolId);
121
122
123 CREATE VIEW v_Experiment AS
124 SELECT * FROM Experiment;
125
126
127 CREATE TABLE Snapshot (
128 id bigint not null
129 , DTYPE varchar(32)
130 , publisherDID varchar(256) not null
131 , time_value varchar(256) not null
132 , time_unit varchar(32)
133 , spatialSizePhysical_value varchar(256) not null
134 , spatialSizePhysical_unit varchar(32)
135 );
136
137
138 CREATE VIEW v_Snapshot AS
139 SELECT * FROM Snapshot;
140
141
142 CREATE TABLE ClusterDetection (
143 id bigint not null
144 );
145
146
147 CREATE INDEX ix_ClusterDetection_protocol (protocolId);
148
149
150 CREATE FOREIGN KEY fk_ClusterDetection_protocol (protocolId);
151
152
153 CREATE VIEW v_ClusterDetection AS
154 SELECT * FROM ClusterDetection;
155
156
157 CREATE TABLE Algorithm (
158 id bigint not null
159 , DTYPE varchar(32)
160 , name varchar(256) not null
161 , description varchar(256)
162 , label varchar(256)
163 );
164
165
166 CREATE VIEW v_Algorithm AS
167 SELECT * FROM Algorithm;
168
169
170 CREATE TABLE Visualisation (
171 id bigint not null
172 );
173
174
175 CREATE INDEX ix_Visualisation_protocol (protocolId);
176
177
178 CREATE FOREIGN KEY fk_Visualisation_protocol (protocolId);
179
180
181 CREATE VIEW v_Visualisation AS
182 SELECT * FROM Visualisation;
183
184
185 CREATE TABLE PostProcessing (
186 id bigint not null
187 , primaryExperimentId bigint null -- Experiment
188 );
189
190
191 CREATE INDEX ix_PostProcessing_primaryExperiment (primaryExperimentId);
192
193
194 CREATE FOREIGN KEY fk_PostProcessing_primaryExperiment (primaryExperimentId);
195
196
197 CREATE VIEW v_PostProcessing AS
198 SELECT * FROM PostProcessing;
199
200
201 CREATE TABLE InputDataset (
202 id bigint not null
203 , DTYPE varchar(32)
204 , snapshotId bigint not null -- Snapshot
205 );
206
207
208 CREATE INDEX ix_InputDataset_snapshot (snapshotId);
209
210
211 CREATE FOREIGN KEY fk_InputDataset_snapshot (snapshotId);
212
213
214 CREATE VIEW v_InputDataset AS
215 SELECT * FROM InputDataset;
216
217
218 CREATE TABLE WebService (
219 id bigint not null
220 , DTYPE varchar(32)
221 , baseURL varchar(256) not null
222 , description varchar(256)
223 , type varchar(256) -- ServiceType
224 );
225
226
227 CREATE VIEW v_WebService AS
228 SELECT * FROM WebService;
229
230
231 CREATE TABLE TargetProcess (
232 id bigint not null
233 , astroJournalSubject varchar(256)
234 );
235
236
237 CREATE VIEW v_TargetProcess AS
238 SELECT * FROM TargetProcess;
239
240
241 CREATE TABLE ParameterSetting (
242 id bigint not null
243 , DTYPE varchar(32)
244 , inputParameterId bigint null -- InputParameter
245 );
246
247
248 CREATE INDEX ix_ParameterSetting_inputParameter (inputParameterId);
249
250
251 CREATE FOREIGN KEY fk_ParameterSetting_inputParameter (inputParameterId);
252
253
254 CREATE VIEW v_ParameterSetting AS
255 SELECT * FROM ParameterSetting;
256
257
258 CREATE TABLE AppliedPhysics (
259 id bigint not null
260 , DTYPE varchar(32)
261 , physicsId bigint not null -- Physics
262 );
263
264
265 CREATE INDEX ix_AppliedPhysics_physics (physicsId);
266
267
268 CREATE FOREIGN KEY fk_AppliedPhysics_physics (physicsId);
269
270
271 CREATE VIEW v_AppliedPhysics AS
272 SELECT * FROM AppliedPhysics;
273
274
275 CREATE TABLE SubvolumeExtraction (
276 id bigint not null
277 );
278
279
280 CREATE INDEX ix_SubvolumeExtraction_protocol (protocolId);
281
282
283 CREATE FOREIGN KEY fk_SubvolumeExtraction_protocol (protocolId);
284
285
286 CREATE VIEW v_SubvolumeExtraction AS
287 SELECT * FROM SubvolumeExtraction;
288
289
290 CREATE TABLE ExperimentRepresentationObject (
291 id bigint not null
292 , DTYPE varchar(32)
293 , typeId bigint not null -- RepresentationObjectType
294 );
295
296
297 CREATE INDEX ix_ExperimentRepresentationObject_type (typeId);
298
299
300 CREATE FOREIGN KEY fk_ExperimentRepresentationObject_type (typeId);
301
302
303 CREATE VIEW v_ExperimentRepresentationObject AS
304 SELECT * FROM ExperimentRepresentationObject;
305
306
307 CREATE TABLE ExperimentProperty (
308 id bigint not null
309 , DTYPE varchar(32)
310 , propertyId bigint not null -- Property
311 );
312
313
314 CREATE INDEX ix_ExperimentProperty_property (propertyId);
315
316
317 CREATE FOREIGN KEY fk_ExperimentProperty_property (propertyId);
318
319
320 CREATE VIEW v_ExperimentProperty AS
321 SELECT * FROM ExperimentProperty;
322
323
324 CREATE TABLE TargetObjectType (
325 id bigint not null
326 , multiplicity varchar(256) -- Cardinality
327 , identityName varchar(256)
328 , astroJournalSubject varchar(256)
329 );
330
331
332 CREATE VIEW v_TargetObjectType AS
333 SELECT * FROM TargetObjectType;
334
335
336 CREATE TABLE CompositeExperiment (
337 id bigint not null
338 );
339
340
341 CREATE INDEX ix_CompositeExperiment_protocol (protocolId);
342
343
344 CREATE FOREIGN KEY fk_CompositeExperiment_protocol (protocolId);
345
346
347 CREATE VIEW v_CompositeExperiment AS
348 SELECT * FROM CompositeExperiment;
349
350
351 CREATE TABLE CompositeProtocol (
352 id bigint not null
353 );
354
355
356 CREATE VIEW v_CompositeProtocol AS
357 SELECT * FROM CompositeProtocol;
358
359
360 CREATE TABLE ChildExperiment (
361 id bigint not null
362 , DTYPE varchar(32)
363 , experimentId bigint not null -- Experiment
364 );
365
366
367 CREATE INDEX ix_ChildExperiment_experiment (experimentId);
368
369
370 CREATE FOREIGN KEY fk_ChildExperiment_experiment (experimentId);
371
372
373 CREATE VIEW v_ChildExperiment AS
374 SELECT * FROM ChildExperiment;
375
376
377 CREATE TABLE ChildProtocol (
378 id bigint not null
379 , DTYPE varchar(32)
380 , protocolId bigint not null -- Protocol
381 );
382
383
384 CREATE INDEX ix_ChildProtocol_protocol (protocolId);
385
386
387 CREATE FOREIGN KEY fk_ChildProtocol_protocol (protocolId);
388
389
390 CREATE VIEW v_ChildProtocol AS
391 SELECT * FROM ChildProtocol;
392
393
394 CREATE TABLE GenericParameterSetting (
395 id bigint not null
396 , value varchar(256) not null
397 );
398
399
400 CREATE VIEW v_GenericParameterSetting AS
401 SELECT * FROM GenericParameterSetting;
402
403
404 CREATE TABLE NumericParameterSetting (
405 id bigint not null
406 , value_value varchar(256) not null
407 , value_unit varchar(32)
408 );
409
410
411 CREATE VIEW v_NumericParameterSetting AS
412 SELECT * FROM NumericParameterSetting;
413
414
415 CREATE TABLE Physics (
416 id bigint not null
417 , DTYPE varchar(32)
418 , name varchar(256)
419 , description varchar(256)
420 , texForm varchar(256)
421 , physicslabel varchar(256)
422 );
423
424
425 CREATE VIEW v_Physics AS
426 SELECT * FROM Physics;
427
428
429 CREATE TABLE Simulator (
430 id bigint not null
431 );
432
433
434 CREATE VIEW v_Simulator AS
435 SELECT * FROM Simulator;
436
437
438 CREATE TABLE Protocol (
439 id bigint not null
440 , code varchar(256)
441 , version varchar(256)
442 );
443
444
445 CREATE VIEW v_Protocol AS
446 SELECT * FROM Protocol;
447
448
449 CREATE TABLE ClusterFinder (
450 id bigint not null
451 );
452
453
454 CREATE VIEW v_ClusterFinder AS
455 SELECT * FROM ClusterFinder;
456
457
458 CREATE TABLE Visualiser (
459 id bigint not null
460 );
461
462
463 CREATE VIEW v_Visualiser AS
464 SELECT * FROM Visualiser;
465
466
467 CREATE TABLE InputParameter (
468 id bigint not null
469 , DTYPE varchar(32)
470 , name varchar(256)
471 , datatype varchar(256) -- DataType
472 , cardinality varchar(256) -- Cardinality
473 , label varchar(256)
474 , description varchar(256)
475 );
476
477
478 CREATE VIEW v_InputParameter AS
479 SELECT * FROM InputParameter;
480
481
482 CREATE TABLE ParameterGroup (
483 id bigint not null
484 , DTYPE varchar(32)
485 , name varchar(256)
486 , description varchar(256)
487 );
488
489
490 CREATE VIEW v_ParameterGroup AS
491 SELECT * FROM ParameterGroup;
492
493
494 CREATE TABLE ParameterGroupMember (
495 id bigint not null
496 , DTYPE varchar(32)
497 , parameterId bigint not null -- InputParameter
498 );
499
500
501 CREATE INDEX ix_ParameterGroupMember_parameter (parameterId);
502
503
504 CREATE FOREIGN KEY fk_ParameterGroupMember_parameter (parameterId);
505
506
507 CREATE VIEW v_ParameterGroupMember AS
508 SELECT * FROM ParameterGroupMember;
509
510
511 CREATE TABLE SubvolumeExtractor (
512 id bigint not null
513 );
514
515
516 CREATE VIEW v_SubvolumeExtractor AS
517 SELECT * FROM SubvolumeExtractor;
518
519
520 CREATE TABLE RepresentationObjectType (
521 id bigint not null
522 , label varchar(256) -- RepresentationObject
523 , astroJournalSubject varchar(256)
524 );
525
526
527 CREATE VIEW v_RepresentationObjectType AS
528 SELECT * FROM RepresentationObjectType;
529
530
531 CREATE TABLE ProjectExperiment (
532 id bigint not null
533 , DTYPE varchar(32)
534 , experimentId bigint not null -- Experiment
535 );
536
537
538 CREATE INDEX ix_ProjectExperiment_experiment (experimentId);
539
540
541 CREATE FOREIGN KEY fk_ProjectExperiment_experiment (experimentId);
542
543
544 CREATE VIEW v_ProjectExperiment AS
545 SELECT * FROM ProjectExperiment;
546
547
548 CREATE TABLE Project (
549 id bigint not null
550 );
551
552
553 CREATE VIEW v_Project AS
554 SELECT * FROM Project;
555
556
557 CREATE TABLE ChildObject (
558 id bigint not null
559 , DTYPE varchar(32)
560 , name varchar(32) not null
561 , cardinality varchar(256) -- Cardinality
562 , objectId bigint not null -- ObjectType
563 );
564
565
566 CREATE INDEX ix_ChildObject_object (objectId);
567
568
569 CREATE FOREIGN KEY fk_ChildObject_object (objectId);
570
571
572 CREATE VIEW v_ChildObject AS
573 SELECT * FROM ChildObject;
574
575
576 CREATE TABLE PropertyGroupMember (
577 id bigint not null
578 , DTYPE varchar(32)
579 , propertyId bigint not null -- Property
580 );
581
582
583 CREATE INDEX ix_PropertyGroupMember_property (propertyId);
584
585
586 CREATE FOREIGN KEY fk_PropertyGroupMember_property (propertyId);
587
588
589 CREATE VIEW v_PropertyGroupMember AS
590 SELECT * FROM PropertyGroupMember;
591
592
593 CREATE TABLE PropertyGroup (
594 id bigint not null
595 , DTYPE varchar(32)
596 , name varchar(256) not null
597 , description varchar(256)
598 );
599
600
601 CREATE VIEW v_PropertyGroup AS
602 SELECT * FROM PropertyGroup;
603
604
605 CREATE TABLE Property (
606 id bigint not null
607 , DTYPE varchar(32)
608 , name varchar(256) not null
609 , datatype varchar(256) -- DataType
610 , cardinality varchar(256) -- Cardinality
611 , ucd varchar(256)
612 , description varchar(256)
613 );
614
615
616 CREATE VIEW v_Property AS
617 SELECT * FROM Property;
618
619
620 CREATE TABLE ObjectType (
621 id bigint not null
622 , DTYPE varchar(32)
623 , name varchar(32) not null
624 , description text
625 );
626
627
628 CREATE VIEW v_ObjectType AS
629 SELECT * FROM ObjectType;
630

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26