Skip to main content
summaryrefslogtreecommitdiffstats
blob: 92af25d6d43f6f86ed367d2e9cba8c77b098bf77 (plain) (blame)
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
<?xml version="1.0" encoding="UTF-8"?>
<TableConfig>


	<!-- __________________________________________________________ -->
	<!--              Type Tables 					                   -->
	<!-- __________________________________________________________ -->
	
	<Table name="OSEE_TYPE_ID_MAP" schema="OSEE" tablespace="osee_data">
		<Column id="LOCAL_ID" defaultValue="not null" type="smallint" />
		<Column id="REMOTE_ID" defaultValue="not null" type="BIGINT" />
		<Index id="OSEE_TYPE_ID_MAP_L_IDX" type="UNIQUE" tablespace="osee_index">
			<AppliesTo id="LOCAL_ID"/>
		</Index>
		<Index id="OSEE_TYPE_ID_MAP_R_IDX" type="UNIQUE" tablespace="osee_index">
			<AppliesTo id="REMOTE_ID"/>
		</Index>
	</Table>
	
	<TableDescription referenceTable="OSEE_TYPE_ID_MAP">
		<Note purpose="Mapping of remote_id to local_id for type token lookups"/>
		<Column id="LOCAL_ID" description="" />
		<Column id="REMOTE_ID" description="" />
	</TableDescription>

	<Table name="OSEE_ATTRIBUTE_PROVIDER_TYPE" schema="OSEE" tablespace="osee_data">
		<Column id="ATTR_PROVIDER_TYPE_ID" defaultValue="not null" type="smallint" />
		<Column id="ATTRIBUTE_PROVIDER_CLASS" defaultValue="not null" limits="500" type="VARCHAR" />
		<Constraint schema="OSEE" id="OSEE_ATTR_PROVIDER_TYPE_AT_PK" type="PRIMARY KEY" appliesTo="ATTR_PROVIDER_TYPE_ID" />
	</Table>
	
	<TableDescription referenceTable="OSEE_ATTRIBUTE_PROVIDER_TYPE">
		<Note purpose="Attibute provider types are used to create factory objects specializing in implmenting basic CRUD operations for various attributes."/>
		<Column id="ATTR_PROVIDER_TYPE_ID" description="" example="org.eclipse.osee.framework.skynet.core.DefaultAttributeDataProvider" />
		<Column id="ATTRIBUTE_PROVIDER_CLASS" description="" example="1" />
	</TableDescription>


	<!-- _____________________________________________________ -->
	<!--                                                       -->
	<!--              MAIN ARTIFACT TABLES                     -->
	<!--                                                       -->
	<!-- _____________________________________________________ -->

	<Table name="OSEE_ARTIFACT" schema="OSEE" tablespace="osee_data">
		<Column id="GAMMA_ID" defaultValue="not null" type="BIGINT" />
		<Column id="ART_ID" defaultValue="not null" type="INTEGER" />
		<Column id="ART_TYPE_ID" defaultValue="not null" type="smallint" />
		<Column id="GUID" defaultValue="not null" limits="22" type="VARCHAR" />
		<Column id="HUMAN_READABLE_ID" defaultValue="not null" limits="5" type="VARCHAR" />
		<Constraint schema="OSEE" id="OSEE_ART__G_A_PK" type="PRIMARY KEY" appliesTo="ART_ID, GAMMA_ID" />
	 	<Constraint schema="OSEE" id="OSEE_ART__ART_TYPE_ID_FK" type="FOREIGN KEY" appliesTo="ART_TYPE_ID" deferrable="true">
			<References schema="OSEE" table="OSEE_TYPE_ID_MAP" column="LOCAL_ID" />
		</Constraint>

		<Index id="OSEE_ART__ART_ID_IDX" tablespace="osee_index">
			<AppliesTo id="ART_ID"/>
		</Index>
		<Index id="OSEE_ART__GUID_IDX" tablespace="osee_index">
			<AppliesTo id="GUID"/>
		</Index>
		<Index id="OSEE_ART__ART_TYPE_ID_IDX" tablespace="osee_index">
			<AppliesTo id="ART_TYPE_ID"/>
		</Index>
	</Table>

	<TableDescription referenceTable="OSEE_ARTIFACT">
		<Note purpose="Core definition for artifact instances."/>
		<Column id="GAMMA_ID" description="unique identifier for a version of this artifact"/>
		<Column id="ART_ID" description="unique identifier of this artifact" />
		<Column id="ART_TYPE_ID" description="this artifact&apos;s type - foreign key to osee_artifact_type.art_type_id " />
		<Column id="GUID" description="Global Unique IDentifier of this artifact" />
		<Column id="HUMAN_READABLE_ID" description="a human understandble unique identifier of this artifact" />
	</TableDescription>

	<Table name="OSEE_ATTRIBUTE" schema="OSEE" tablespace="osee_data">
		<Column id="GAMMA_ID" defaultValue="not null" type="BIGINT" />
		<Column id="ART_ID" defaultValue="not null" type="INTEGER" />
		<Column id="ATTR_ID" defaultValue="not null" type="INTEGER" />
		<Column id="ATTR_TYPE_ID" defaultValue="not null" type="smallint" />
		<Column id="VALUE" limits="4000" type="VARCHAR" />
		<Column id="URI" limits="200" type="VARCHAR" />
		<Constraint schema="OSEE" id="OSEE_ATTRIBUTE_AT_G_PK" type="PRIMARY KEY" appliesTo="ATTR_ID, GAMMA_ID" />
		<Index id="OSEE_ATTRIBUTE_ATT_IDX" tablespace="osee_index">
			<AppliesTo id="ATTR_TYPE_ID"/>
		</Index>
 	  	<Index id="OSEE_ATTRIBUTE_V_IDX" mySqlIgnore="true" tablespace="osee_index">
			<AppliesTo id="VALUE"/>
		</Index>
		<Index id="OSEE_ATTRIBUTE_AR_V_IDX" mySqlIgnore="true" tablespace="osee_index">
			<AppliesTo id="ART_ID"/>
			<AppliesTo id="VALUE"/>
		</Index>
		<Index id="OSEE_ATTRIBUTE_AR_G_IDX" type="UNIQUE" tablespace="osee_index">
			<AppliesTo id="ART_ID"/>
			<AppliesTo id="GAMMA_ID"/>
		</Index>
		<Index id="OSEE_ATTRIBUTE_G_AT_IDX" type="UNIQUE" tablespace="osee_index">
			<AppliesTo id="GAMMA_ID"/>
			<AppliesTo id="ATTR_ID"/>
		</Index>
		<Index id="OSEE_ATTRIBUTE_G_IDX" type="UNIQUE" tablespace="osee_index">
			<AppliesTo id="GAMMA_ID"/>
		</Index>
		<Index id="OSEE_ATTRIBUTE_AT_IDX" tablespace="osee_index">
			<AppliesTo id="ATTR_ID"/>
		</Index>
		<Index id="OSEE_ATTRIBUTE_AR_IDX" mySqlIgnore="true" tablespace="osee_index">
			<AppliesTo id="ART_ID"/>
		</Index>
	</Table>
	
	<TableDescription referenceTable="OSEE_ATTRIBUTE">
		<Note purpose="Core descriptions for types of attributes."/>
		<Column id="GAMMA_ID" description="" />
		<Column id="ART_ID" description="" />
		<Column id="ATTR_ID" description="" />
		<Column id="ATTR_TYPE_ID" description="" />
		<Column id="VALUE" description="" />
		<Column id="URI" description="" />
	</TableDescription>
	
	<Table name="OSEE_RELATION_LINK" schema="OSEE" tablespace="osee_data">
		<Column id="GAMMA_ID" defaultValue="not null" type="BIGINT" />
		<Column id="REL_LINK_ID" defaultValue="not null" type="INTEGER" />
		<Column id="REL_LINK_TYPE_ID" defaultValue="not null" type="smallint" />
		<Column id="A_ART_ID" defaultValue="not null" type="INTEGER" />
		<Column id="B_ART_ID" defaultValue="not null" type="INTEGER" />
		<Column id="RATIONALE" limits="4000" type="VARCHAR" />
		<Constraint schema="OSEE" id="OSEE_RELATION__G_PK" type="PRIMARY KEY" appliesTo="GAMMA_ID" />	
	 	<Constraint schema="OSEE" id="OSEE_RELATION__REL_TYPE_FK" type="FOREIGN KEY" appliesTo="REL_LINK_TYPE_ID" deferrable="true">
			<References schema="OSEE" table="OSEE_TYPE_ID_MAP" column="LOCAL_ID"  />
		</Constraint>
		<Index id="OSEE_RELATION__R_G_IDX" type="UNIQUE" tablespace="osee_index">
			<AppliesTo id="REL_LINK_ID"/>
			<AppliesTo id="GAMMA_ID"/>
		</Index>
		<Index id="OSEE_RELATION__A_IDX" tablespace="osee_index">
			<AppliesTo id="A_ART_ID"/>
		</Index>
		<Index id="OSEE_RELATION__B_IDX" tablespace="osee_index">
			<AppliesTo id="B_ART_ID"/>
		</Index>
	</Table>
	
	<TableDescription referenceTable="OSEE_RELATION_LINK">
		<Note purpose="Relation instances which relate exactly 2 (different) artifacts."/>
		<Column id="RATIONALE" description="Provides an explantion/justification for the existance of this relation" />
	</TableDescription>

	<!-- __________________________________________________________ -->
	<!--                                                            -->
	<!--  MAIN VERSIONING TABLES - CHANGE, TX, AND BRANCH SUPPORT   -->
	<!--                                                            -->
	<!-- __________________________________________________________ -->
	
	
	<Table name="OSEE_BRANCH" schema="OSEE" tablespace="osee_data">
		<Column id="BRANCH_GUID"  defaultValue="not null" limits="28" type="VARCHAR" />
		<Column id="BRANCH_ID" defaultValue="not null" type="INTEGER" />
		<Column id="BRANCH_NAME" defaultValue="not null" limits="200" type="VARCHAR" />		
		<Column id="PARENT_BRANCH_ID" defaultValue="not null" type="INTEGER" />
		<Column id="PARENT_TRANSACTION_ID" defaultValue="not null" type="INTEGER" />
		<Column id="ARCHIVED" defaultValue="not null" type="smallint" />
		<Column id="BRANCH_STATE" defaultValue="not null" type="smallint" />
		<Column id="ASSOCIATED_ART_ID" defaultValue="not null" type="INTEGER" />
		<Column id="BRANCH_TYPE" defaultValue="not null" type="smallint" />
		<Column id="BASELINE_TRANSACTION_ID" defaultValue="not null" type="INTEGER" />
		
		<Constraint schema="OSEE" id="OSEE_BRANCH_B_PK" type="PRIMARY KEY" appliesTo="BRANCH_ID" />
		<Constraint schema="OSEE" id="OSEE_BRANCH_G_IDX" type="UNIQUE" appliesTo="BRANCH_GUID" />
		<Index id="OSEE_BRANCH_A_IDX" tablespace="osee_index">
			<AppliesTo id="ARCHIVED" />
		</Index>
	</Table>

	<TableDescription referenceTable="OSEE_BRANCH">
		<Note purpose="Core table describing instances of OSEE Branches."/>
		<Column id="BRANCH_GUID" 					description="self-explanatory" />
		<Column id="BRANCH_ID" 						description="self-explanatory" />
		<Column id="BRANCH_NAME" 					description="Simple string name" />
		<Column id="PARENT_BRANCH_ID" 			description="self-explanatory" />
		<Column id="PARENT_TRANSACTION_ID" 		description="self-explanatory" />
		<Column id="ARCHIVED" 						description="Indicates whether transaction information (tx) related to this branch have been kept in the main OSEE_TXS transaction table or moved to the OSEE_TXS_ARCHIVED. " />
		<Column id="BRANCH_STATE" 					description="????" />
		<Column id="ASSOCIATED_ART_ID" 			description="-1 Unknown, 0 Created, 1 Modified, 2 Committed, 3 Rebaselined as referenced in enum BranchState.java" />
		<Column id="BRANCH_TYPE" 					description="0 Working, 2 Baseline, 3 Merge, 4 System Root as referenced in BranchType.java" />
		<Column id="BASELINE_TRANSACTION_ID" 	description="??? what did this mean" />
	</TableDescription>

	<Table name="OSEE_TXS" schema="OSEE" tablespace="osee_data">
		<Column id="BRANCH_ID" type="INTEGER" defaultValue="not null" />
		<Column id="GAMMA_ID" defaultValue="not null" type="BIGINT" />
		<Column id="TRANSACTION_ID" defaultValue="not null" type="INTEGER" />
		<Column id="TX_CURRENT" defaultValue="not null" type="smallint" />
		<Column id="MOD_TYPE" defaultValue="not null" type="smallint" />
		<Index id="OSEE_TXS_B_G_T_IDX" type="UNIQUE" tablespace="osee_index">
			<AppliesTo id="BRANCH_ID"/>
			<AppliesTo id="GAMMA_ID"/>
			<AppliesTo id="TRANSACTION_ID" />
		</Index>
	</Table>
	
	<TableDescription referenceTable="OSEE_TXS">
		<Note purpose="Addressing table"/>
		<Column id="GAMMA_ID" description="A given gamma may be referenced by many branches" />
	</TableDescription>

	<Table name="OSEE_TXS_ARCHIVED" schema="OSEE" tablespace="osee_archive_data">
		<Column id="BRANCH_ID" defaultValue="not null" type="INTEGER" />
		<Column id="GAMMA_ID" defaultValue="not null" type="BIGINT" />
		<Column id="TRANSACTION_ID" defaultValue="not null" type="INTEGER" />
		<Column id="TX_CURRENT" defaultValue="not null" type="smallint" />
		<Column id="MOD_TYPE" defaultValue="not null" type="smallint" />
		<Index id="OSEE_TXSA_B_G_T_IDX" type="UNIQUE" tablespace="osee_archive_index">
			<AppliesTo id="BRANCH_ID"/>
			<AppliesTo id="GAMMA_ID"/>
			<AppliesTo id="TRANSACTION_ID" />
		</Index>
	</Table>

	<TableDescription referenceTable="OSEE_TXS_ARCHIVED">
		<Note purpose="Transactions (tx) removed (archived in OSEE domain) are simply transactions removed from OSEE_TXS. Details of these can be found in OSEE_TXS_DETAILS."/>
		<Column id="BRANCH_ID" description="" />
		<Column id="GAMMA_ID" description="" />
		<Column id="TX_CURRENT" description="" />
		<Column id="MOD_TYPE" description="" />
		<Column id="TRANSACTION_ID" description="" />
	</TableDescription>

	<Table name="OSEE_TX_DETAILS" schema="OSEE" tablespace="osee_data">
		<Column id="TRANSACTION_ID" defaultValue="not null" type="INTEGER" />
		<Column id="TX_TYPE" defaultValue="not null" type="smallint" />
		<Column id="BRANCH_ID" defaultValue="not null" type="INTEGER" />
		<Column id="OSEE_COMMENT" limits="1000" type="VARCHAR" />
		<Column id="TIME" defaultValue="not null" type="TIMESTAMP"/>
	   <Column id="AUTHOR" defaultValue="not null" type="INTEGER"/>
		<Column id="COMMIT_ART_ID" type="INTEGER" />
		<Constraint schema="OSEE" id="BRANCH_ID_FK1" type="FOREIGN KEY" appliesTo="BRANCH_ID" deferrable="true">
			<References schema="OSEE" table="OSEE_BRANCH" column="BRANCH_ID" />
		</Constraint>
		<Index id="OSEE_TX_DETAILS_B_TX_IDX" type="UNIQUE" tablespace="osee_index">
			<AppliesTo id="BRANCH_ID"/>
			<AppliesTo id="TRANSACTION_ID" />
		</Index>
	</Table>
	
	<TableDescription referenceTable="OSEE_TX_DETAILS">
		<Note purpose="Core table describing individual transactions from both OSEE_TXS and OSEE_TXS_ARCHIVED in larger context. Unique? transaction id."/>
		<Column id="TRANSACTION_ID" description="Transaction ID sequence derrived from OSEE_SEQUENCE.SKYNET_TRANSACTION_ID_SEQ" example="241"/>
		<Column id="TX_TYPE" description="??? 1 - Baseline, 0 - Non Baseline tx, meaning tx beginning tx on a branch derived from parent branch" />
		<Column id="BRANCH_ID" description="simple, integer based id" example="1" />
		<Column id="OSEE_COMMENT" description="Optional comment user gets to enter before certain transactions." />
		<Column id="TIME" description="self-explanatory"/>
	   <Column id="AUTHOR" description="self-explanatory"/>
		<Column id="COMMIT_ART_ID" description="if NOT NULL, identifies committed branches (all types of commits of a branch).
		You can trace this Artifact ID back to a particular instance of an artifact performing the commit.
		Usually this references an Action (type-of-artifact)" example="370"/>
	</TableDescription>

	<!-- __________________________________________________________ -->
	<!--                                                            -->
	<!--                        ACCESS CONTROL LIST TABLES    -->
	<!--                                                            -->
	<!-- __________________________________________________________ -->
	
	<Table name="OSEE_ARTIFACT_ACL" schema="OSEE" tablespace="osee_data">
		<Column id="ART_ID" defaultValue="not null" type="INTEGER" />
		<Column id="PERMISSION_ID" defaultValue="not null" type="INTEGER" />
		<Column id="PRIVILEGE_ENTITY_ID" defaultValue="not null" type="INTEGER" />
	   <Column id="BRANCH_ID" defaultValue="not null" type="INTEGER" />
		<Constraint schema="OSEE" id="OSEE_ARTIFACT_ACL_A_P_B_PK" type="PRIMARY KEY" appliesTo="ART_ID, PRIVILEGE_ENTITY_ID, BRANCH_ID" />
		<Constraint schema="OSEE" id="ARTIFACT_ACL_PERM_FK" type="FOREIGN KEY" appliesTo="PERMISSION_ID" deferrable="true">
			<References schema="OSEE" table="OSEE_PERMISSION" column="PERMISSION_ID"  />
		</Constraint>
   </Table>
   
   <Table name="OSEE_BRANCH_ACL" schema="OSEE" tablespace="osee_data">
		<Column id="BRANCH_ID" defaultValue="not null" type="INTEGER" />
		<Column id="PERMISSION_ID" defaultValue="not null" type="INTEGER" />
		<Column id="PRIVILEGE_ENTITY_ID" defaultValue="not null" type="INTEGER" />
		<Constraint schema="OSEE" id="OSEE_BRANCH_ACL_B_P_PK" type="PRIMARY KEY" appliesTo="BRANCH_ID, PRIVILEGE_ENTITY_ID" />
		<Constraint schema="OSEE" id="BRANCH_ACL_FK" type="FOREIGN KEY" appliesTo="BRANCH_ID" deferrable="true">
			<References schema="OSEE" table="OSEE_BRANCH" column="BRANCH_ID"  />
		</Constraint>
		<Constraint schema="OSEE" id="BRANCH_ACL_PERM_FK" type="FOREIGN KEY" appliesTo="PERMISSION_ID" deferrable="true">
			<References schema="OSEE" table="OSEE_PERMISSION" column="PERMISSION_ID"  />
		</Constraint>
   </Table>
	   
   <Table name="OSEE_PERMISSION" schema="OSEE" tablespace="osee_data">
		<Column id="PERMISSION_ID" defaultValue="not null" type="INTEGER" />
		<Column id="PERMISSION_NAME" defaultValue="not null" limits="50" type="VARCHAR" />
		<Constraint schema="OSEE" id="PERMISSION_PK" type="PRIMARY KEY" appliesTo="PERMISSION_ID" />
   </Table>

	<!-- __________________________________________________________ -->
	<!--                                                            -->
	<!--                      TAGGING TABLES                        -->
	<!--                                                            -->
	<!-- __________________________________________________________ -->
	   
	<Table name="OSEE_SEARCH_TAGS" schema="OSEE" tablespace="osee_data">
		<Column id="GAMMA_ID" defaultValue="not null" type="BIGINT" />
		<Column id="CODED_TAG_ID" defaultValue="not null" type="BIGINT" />
		<Constraint schema="OSEE" id="OSEE_SEARCH_TAGS__PK" type="PRIMARY KEY" appliesTo="CODED_TAG_ID, GAMMA_ID" />
		<Index id="OSEE_SEARCH_TAGS_C_IDX" tablespace="osee_index">
			<AppliesTo id="CODED_TAG_ID"/>
		</Index>
		<Index id="OSEE_SEARCH_TAGS_G_IDX" tablespace="osee_index">
			<AppliesTo id="GAMMA_ID"/>
		</Index>
	</Table>
	
	<TableDescription referenceTable="OSEE_SEARCH_TAGS">
		<Note purpose="Core table describing individual transactions from both OSEE_TXS and OSEE_TXS_ARCHIVED in larger context. Unique? transaction id."/>
		<Column id="TRANSACTION_ID" description="Transaction ID sequence derrived from OSEE_SEQUENCE.SKYNET_TRANSACTION_ID_SEQ" example="241"/>
		<Column id="TX_TYPE" description="??? 1 - Baseline, 0 - Non Baseline tx, meaning tx beginning tx on a branch derived from parent branch" />
		<Column id="BRANCH_ID" description="simple, integer based id" example="1" />
		<Column id="OSEE_COMMENT" description="Optional comment user gets to enter before certain transactions." />
		<Column id="TIME" description="self-explanatory"/>
	   <Column id="AUTHOR" description="self-explanatory"/>
		<Column id="COMMIT_ART_ID" description="if NOT NULL, identifies committed branches (all types of commits of a branch).
		You can trace this Artifact ID back to a particular instance of an artifact performing the commit.
		Usually this references an Action (type-of-artifact)" example="370"/>
	</TableDescription>

	<Table name="OSEE_JOIN_SEARCH_TAGS" schema="OSEE" tablespace="osee_data">
		<Column id="QUERY_ID" defaultValue="not null" type="INTEGER" />
		<Column id="CODED_TAG_ID" defaultValue="not null" type="BIGINT" />
		<Column id="INSERT_TIME" defaultValue="not null" type="TIMESTAMP" />
		<Constraint schema="OSEE" id="OSEE_JOIN_SEARCH_TAGS_Q_C_PK" type="PRIMARY KEY" appliesTo="QUERY_ID, CODED_TAG_ID" />
		<Index id="OSEE_JOIN_SEARCH_TAGS_Q_IDX" tablespace="osee_index">
			<AppliesTo id="QUERY_ID"/>
		</Index>
	</Table>
	   
	<TableDescription referenceTable="OSEE_JOIN_SEARCH_TAGS">
		<Note purpose="Core table describing ?"/>
		<Column id="QUERY_ID" description="randomly generated identifier for this short-lived join" />
		<Column id="CODED_TAG_ID" description="" />
		<Column id="INSERT_TIME" description="" />
	</TableDescription>

	<Table name="OSEE_TAG_GAMMA_QUEUE" schema="OSEE" tablespace="osee_data">
		<Column id="QUERY_ID" defaultValue="not null" type="INTEGER" />
		<Column id="GAMMA_ID" defaultValue="not null" type="BIGINT" />
		<Column id="INSERT_TIME" defaultValue="not null" type="TIMESTAMP" />
		<Constraint schema="OSEE" id="OSEE_JOIN_GAMMA_Q_G_PK" type="PRIMARY KEY" appliesTo="QUERY_ID, GAMMA_ID" />
	</Table>   
   
   <TableDescription referenceTable="OSEE_TAG_GAMMA_QUEUE">
		<Note purpose="Core table describing ?"/>
		<Column id="QUERY_ID" description="randomly generated identifier for this short-lived join" />
		<Column id="GAMMA_ID" description="" />
		<Column id="INSERT_TIME" description="" />
	</TableDescription>

	<!-- __________________________________________________________ -->
	<!--                                                            -->
	<!--                                  OSEE SEQUENCES and INFO   -->
	<!--                                                            -->
	<!-- __________________________________________________________ -->
	
	<Table name="OSEE_SEQUENCE" schema="OSEE" tablespace="osee_data">
		<Column id="LAST_SEQUENCE" defaultValue="not null" type="BIGINT" />
		<Column id="SEQUENCE_NAME"  defaultValue="not null" type="VARCHAR" limits="128" />
		<Constraint schema="OSEE" id="SEQUENCE_ID_UN" type="UNIQUE" appliesTo="SEQUENCE_NAME" />
	</Table>

	<TableDescription referenceTable="OSEE_SEQUENCE">
		<Note purpose="Keeps track of last generated value of a sequence of given name - SEQUENCE_NAME."/>
	</TableDescription>

  <Table name="OSEE_INFO" schema="OSEE" tablespace="osee_data">
    <Column id="OSEE_VALUE" defaultValue="not null"  type="VARCHAR" limits="1000" />
    <Column id="OSEE_KEY" defaultValue="not null"  type="VARCHAR" limits="50" />
    <Constraint schema="OSEE" id="OSEE_INFO_KEY_UN_IDX" type="UNIQUE" appliesTo="OSEE_KEY" />
  </Table>

  <TableDescription referenceTable="OSEE_INFO">
		<Note purpose="Core table describing ?"/>
		<Column id="OSEE_VALUE" description="" />
		<Column id="OSEE_KEY" description="" />
	</TableDescription>

	<!-- __________________________________________________________ -->
	<!--                                                            -->
	<!--                                  OSEE Merge                -->
	<!--                                                            -->
	<!-- __________________________________________________________ -->
	
	<Table name="OSEE_MERGE" schema="OSEE" tablespace="osee_data">
		<Column id="SOURCE_BRANCH_ID" defaultValue="not null" type="INTEGER" />
		<Column id="DEST_BRANCH_ID" defaultValue="not null" type="INTEGER" />
		<Column id="MERGE_BRANCH_ID" defaultValue="not null" type="INTEGER" />
		<Column id="COMMIT_TRANSACTION_ID" defaultValue="not null" type="INTEGER" />
		<Constraint schema="OSEE" id="OSEE_MERGE__PK" type="PRIMARY KEY" appliesTo="MERGE_BRANCH_ID" />
		<Constraint schema="OSEE" id="OSEE_MERGE__MBI_FK" type="FOREIGN KEY" appliesTo="MERGE_BRANCH_ID">
			<References schema="OSEE" table="OSEE_BRANCH" column="BRANCH_ID"  />
		</Constraint>
		<Constraint schema="OSEE" id="OSEE_MERGE__DBI_FK" type="FOREIGN KEY" appliesTo="DEST_BRANCH_ID">
			<References schema="OSEE" table="OSEE_BRANCH" column="BRANCH_ID"  />
		</Constraint>
   </Table>
   
   <TableDescription referenceTable="OSEE_MERGE">
		<Note purpose="Core table describing merge branches"/>
		<Column id="SOURCE_BRANCH_ID" description="" />
		<Column id="DEST_BRANCH_ID" description="" />
		<Column id="MERGE_BRANCH_ID" description="" />
		<Column id="COMMIT_TRANSACTION_ID" description="" />
	</TableDescription>

   <Table name="OSEE_CONFLICT" schema="OSEE" tablespace="osee_data">
		<Column id="CONFLICT_ID" defaultValue="not null" type="INTEGER" />
		<Column id="MERGE_BRANCH_ID" defaultValue="not null" type="INTEGER" />
		<Column id="CONFLICT_TYPE" defaultValue="not null" type="smallint" />
		<Column id="SOURCE_GAMMA_ID" defaultValue="not null" type="BIGINT" />
		<Column id="DEST_GAMMA_ID" defaultValue="not null" type="BIGINT" />
		<Column id="STATUS" defaultValue="not null" type="smallint" />
		<Constraint schema="OSEE" id="OSEE_CONFLICT__PK" type="PRIMARY KEY" appliesTo="MERGE_BRANCH_ID, SOURCE_GAMMA_ID" />
		<Constraint schema="OSEE" id="OSEE_CONFLICT__MBI_FK" type="FOREIGN KEY" appliesTo="MERGE_BRANCH_ID">
			<References schema="OSEE" table="OSEE_MERGE" column="MERGE_BRANCH_ID" />
		</Constraint>
   </Table>
   
   <TableDescription referenceTable="OSEE_CONFLICT">
		<Note purpose="Core table describing individual conflicts per merge branch."/>
		<Column id="CONFLICT_ID" description="" />
		<Column id="MERGE_BRANCH_ID" description="" />
		<Column id="CONFLICT_TYPE" description="" />
		<Column id="SOURCE_GAMMA_ID" description="" />
		<Column id="DEST_GAMMA_ID" description="" />
		<Column id="STATUS" description="" />
	</TableDescription>
	
	<!-- __________________________________________________________ -->
	<!--                                                            -->
	<!--                      IMPORT TABLES                         -->
	<!-- __________________________________________________________ -->
	
	<Table name="OSEE_JOIN_EXPORT_IMPORT" schema="OSEE" tablespace="osee_data">
		<Column id="QUERY_ID" defaultValue="not null" type="INTEGER" />
		<Column id="ID1" defaultValue="not null" type="BIGINT" />
		<Column id="ID2" defaultValue="not null" type="BIGINT" />
		<Column id="INSERT_TIME" defaultValue="not null" type="TIMESTAMP" />
		<Index id="OSEE_JOIN_EXPORT_IMPORT_Q_IDX" tablespace="osee_index">
			<AppliesTo id="QUERY_ID"/>
		</Index>
	</Table>

	<TableDescription referenceTable="OSEE_JOIN_EXPORT_IMPORT">
		<Note purpose="Core table describing ?"/>
	</TableDescription>

	<Table name="OSEE_IMPORT_SOURCE" schema="OSEE" tablespace="osee_data">
		<Column id="IMPORT_ID" defaultValue="not null" type="INTEGER" />
	  	<Column id="DB_SOURCE_GUID" defaultValue="not null" type="VARCHAR" limits="28"/>
	  	<Column id="SOURCE_EXPORT_DATE" defaultValue="not null" type="TIMESTAMP" />
	  	<Column id="DATE_IMPORTED" defaultValue="not null" type="TIMESTAMP" />
	  	<Constraint schema="OSEE" id="OSEE_IMPORT_MAP_PK" type="PRIMARY KEY" appliesTo="IMPORT_ID" />
	</Table>

	<TableDescription referenceTable="OSEE_IMPORT_SOURCE">
		<Note purpose="Core table describing ?"/>
	</TableDescription>

	<Table name="OSEE_IMPORT_SAVE_POINT" schema="OSEE" tablespace="osee_data">
		<Column id="IMPORT_ID" defaultValue="not null" type="INTEGER" />
		<Column id="SAVE_POINT_NAME" defaultValue="not null" type="VARCHAR" limits="128"/>
		<Column id="STATUS" defaultValue="not null" type="INTEGER" />
		<Column id="STATE_ERROR" type="VARCHAR" limits="4000" />
		<Constraint schema="OSEE" id="OSEE_IMP_SAVE_POINT_II_PK" type="PRIMARY KEY" appliesTo="IMPORT_ID, SAVE_POINT_NAME" />
		<Constraint schema="OSEE" id="OSEE_IMP_SAVE_POINT_II_FK" type="FOREIGN KEY" appliesTo="IMPORT_ID" deferrable="true">
			<References schema="OSEE" table="OSEE_IMPORT_SOURCE" column="IMPORT_ID" />
		</Constraint>
	</Table>

	<TableDescription referenceTable="OSEE_IMPORT_SAVE_POINT">
		<Note purpose="Core table describing ?"/>
	</TableDescription>

	<Table name="OSEE_IMPORT_MAP" schema="OSEE" tablespace="osee_data">
		<Column id="IMPORT_ID" defaultValue="not null" type="INTEGER" />
		<Column id="SEQUENCE_ID" defaultValue="not null" type="INTEGER" />
		<Column id="SEQUENCE_NAME" defaultValue="not null" type="VARCHAR" limits="128"/>
		<Constraint schema="OSEE" id="OSEE_IMPORT_MAP_II_PK" type="PRIMARY KEY" appliesTo="SEQUENCE_ID" />
		<Constraint schema="OSEE" id="OSEE_IMPORT_MAP_II_FK" type="FOREIGN KEY" appliesTo="IMPORT_ID" deferrable="true">
			<References schema="OSEE" table="OSEE_IMPORT_SOURCE" column="IMPORT_ID" />
		</Constraint>
	</Table>

	<TableDescription referenceTable="OSEE_IMPORT_MAP">
		<Note purpose="Core table describing ?"/>
	</TableDescription>

	<Table name="OSEE_IMPORT_INDEX_MAP" schema="OSEE" tablespace="osee_data">
		<Column id="SEQUENCE_ID" defaultValue="not null" type="INTEGER" />
		<Column id="ORIGINAL_ID" defaultValue="not null" type="BIGINT"/>
		<Column id="MAPPED_ID" defaultValue="not null" type="BIGINT" />
		<Constraint schema="OSEE" id="OSEE_IMPORT_INDEX_MAP_IOM_PK" type="PRIMARY KEY" appliesTo="SEQUENCE_ID, ORIGINAL_ID, MAPPED_ID" />
		<Constraint schema="OSEE" id="OSEE_IMPORT_INDEX_MAP_II_FK" type="FOREIGN KEY" appliesTo="SEQUENCE_ID" deferrable="true">
			<References schema="OSEE" table="OSEE_IMPORT_MAP" column="SEQUENCE_ID" />
		</Constraint>
		<Index id="OSEE_IMPORT_INDEX_MAP_IO_IDX" tablespace="osee_index">
			<AppliesTo id="SEQUENCE_ID"/>
			<AppliesTo id="ORIGINAL_ID"/>
		</Index>
		<Index id="OSEE_IMPORT_INDEX_MAP_IM_IDX" tablespace="osee_index">
			<AppliesTo id="SEQUENCE_ID"/>
			<AppliesTo id="MAPPED_ID"/>
		</Index>
	</Table>
	
	<TableDescription referenceTable="OSEE_IMPORT_INDEX_MAP">
		<Note purpose="Core table describing ?"/>
	</TableDescription>

	<!-- __________________________________________________________ -->
	<!--                                                            -->
	<!--              Application Server     						       -->
	<!--                                                            -->
	<!-- __________________________________________________________ -->
	
	<Table name="OSEE_SERVER_LOOKUP" schema="OSEE" tablespace="osee_data">
		<Column id="VERSION_ID" defaultValue="not null" type="VARCHAR" limits="100" />
		<Column id="SERVER_ADDRESS" defaultValue="not null" type="VARCHAR" limits="255"/>
		<Column id="PORT" defaultValue="not null" type="INTEGER" />
		<Column id="ACCEPTS_REQUESTS" defaultValue="not null" type="smallint" />
		<Column id="START_TIME" defaultValue="not null" type="TIMESTAMP" />
		<Column id="SERVER_ID" defaultValue="not null" type="VARCHAR" limits="40" />
		<Constraint schema="OSEE" id="OSEE_SERVER_LOOKUP_PK" type="PRIMARY KEY" appliesTo="SERVER_ADDRESS, PORT, VERSION_ID" />
	</Table>
	
	<TableDescription referenceTable="OSEE_SERVER_LOOKUP">
		<Note purpose="Core table used in arbitration of current OSEE servers"/>
	</TableDescription>

	<Table name="OSEE_SESSION" schema="OSEE" tablespace="osee_data">
		<Column id="MANAGED_BY_SERVER_ID" defaultValue="not null" type="VARCHAR" limits="40" />
		<Column id="SESSION_ID" defaultValue="not null" type="VARCHAR" limits="28" />
		<Column id="USER_ID" defaultValue="not null" type="VARCHAR" limits="100"/>
		<Column id="CLIENT_MACHINE_NAME" defaultValue="not null" type="VARCHAR" limits="100"/>
		<Column id="CLIENT_ADDRESS" defaultValue="not null" type="VARCHAR" limits="255"/>
		<Column id="CLIENT_PORT" defaultValue="not null" type="INTEGER" />
		<Column id="CLIENT_VERSION" defaultValue="not null" type="VARCHAR" limits="100"/>
		<Column id="CREATED_ON" defaultValue="not null" type="TIMESTAMP" />
		<Column id="LAST_INTERACTION_DATE" defaultValue="not null" type="TIMESTAMP" />
		<Column id="LAST_INTERACTION" defaultValue="not null" type="VARCHAR" limits="1000"/>
		<Constraint schema="OSEE" id="OSEE_SESSION_PK" type="PRIMARY KEY" appliesTo="SESSION_ID" />
	</Table>
	
	<TableDescription referenceTable="OSEE_SESSION">
		<Note purpose="Core table describing ?"/>
	</TableDescription>


	<!-- __________________________________________________________ -->
	<!--              Join Tables  					                   -->
	<!-- __________________________________________________________ -->

	<Table name="OSEE_JOIN_ARTIFACT" schema="OSEE" tablespace="osee_data">
		<Column id="QUERY_ID" defaultValue="not null" type="INTEGER" />
		<Column id="ART_ID" defaultValue="not null" type="INTEGER" />
		<Column id="BRANCH_ID" defaultValue="not null" type="INTEGER" />
		<Column id="TRANSACTION_ID" type="INTEGER" />
		<Column id="INSERT_TIME" defaultValue="not null" type="TIMESTAMP" />
		<Index id="OSEE_JOIN_ART__Q_A_B_T_IDX" type="UNIQUE" tablespace="osee_index">
			<AppliesTo id="QUERY_ID"/>
			<AppliesTo id="ART_ID"/>
			<AppliesTo id="BRANCH_ID"/>
			<AppliesTo id="TRANSACTION_ID"/>
		</Index>
	</Table>

	<TableDescription referenceTable="OSEE_JOIN_ARTIFACT">
		<Note purpose="Temporary working table to improve performance of joins"/>
		<Column id="QUERY_ID" 			description="randomly generated identifier for this short-lived join" />
		<Column id="ART_ID" 				description="application specific INTEGER identifier" />
		<Column id="BRANCH_ID" 			description="application specific INTEGER identifier" />
		<Column id="TRANSACTION_ID"	description="application specific INTEGER identifier" />
		<Column id="INSERT_TIME" 		description="time this join query was started" />
	</TableDescription>

	<Table name="OSEE_JOIN_ID" schema="OSEE" tablespace="osee_data">
		<Column id="QUERY_ID" defaultValue="not null" type="INTEGER" />
		<Column id="ID" type="INTEGER" />
		<Column id="INSERT_TIME" type="TIMESTAMP" />
		<Index id="OSEE_JOIN_ID__Q_I_IDX" type="UNIQUE" tablespace="osee_index">
			<AppliesTo id="QUERY_ID"/>
			<AppliesTo id="ID"/>
		</Index>
	</Table>

	<TableDescription referenceTable="OSEE_JOIN_ID">
		<Note purpose="Temporary working table to improve performance of joins"/>
		<Column id="QUERY_ID" 		description="randomly generated identifier for this short-lived join"/>
		<Column id="ID" 				description="application specific INTEGER identifier"/>
		<Column id="INSERT_TIME" 	description="time this join query was started"/>
	</TableDescription>

	<Table name="OSEE_JOIN_CLEANUP" schema="OSEE" tablespace="osee_data">
		<Column id="QUERY_ID" defaultValue="not null" type="INTEGER" />
		<Column id="SESSION_ID" defaultValue="not null" type="VARCHAR" limits="28" />
		<Column id="TABLE_NAME" defaultValue="not null" type="VARCHAR" limits="28"/>
		<Index id="OSEE_JOIN_CLEANUP__Q_IDX" type="UNIQUE" tablespace="osee_index">
			<AppliesTo id="QUERY_ID"/>
		</Index>
	</Table>

	<TableDescription referenceTable="OSEE_JOIN_CLEANUP">
		<Note purpose="Temporary working table that tracks query joins that are used in the other join tables for later clean-up.
		This cleanup is only needed if the application/server fails to do the expected delete
		based on the corresponding query id.  Cleanup is performed when the corresponding session has been closed."/>
		<Column id="QUERY_ID" 		description="randomly generated identifier for this short-lived join"/>
		<Column id="SESSION_ID" 	description="unique identifier of the session that issued the query"/>
		<Column id="TABLE_NAME" 	description="name of the join table that stores the join with this query_id"/>
	</TableDescription>

	<Table name="OSEE_JOIN_CHAR_ID" schema="OSEE" tablespace="osee_data">
		<Column id="QUERY_ID" defaultValue="not null" type="INTEGER" />
		<Column id="ID" defaultValue="not null" type="VARCHAR" limits="4000"/>
		<Index id="OSEE_JOIN_CHAR__Q_IDX" tablespace="osee_index">
			<AppliesTo id="QUERY_ID"/>
		</Index>
	</Table>

	<TableDescription referenceTable="OSEE_JOIN_CHAR_ID">
		<Note purpose="Temporary working table to improve performance of joins of type VARCHAR"/>
		<Column id="QUERY_ID" 		description="randomly generated identifier for this short-lived join"/>
		<Column id="ID" 	description="application specific VARCHAR identifier"/>
	</TableDescription>


	<Table name="OSEE_JOIN_TRANSACTION" schema="OSEE" tablespace="osee_data">
		<Column id="QUERY_ID" defaultValue="not null" type="INTEGER" />
		<Column id="TRANSACTION_ID" defaultValue="not null" type="INTEGER" />
		<Column id="GAMMA_ID" defaultValue="not null" type="BIGINT" />
		<Column id="INSERT_TIME" defaultValue="not null" type="TIMESTAMP" />
		<Index id="OSEE_JOIN_TRANSACTION_Q_IDX" tablespace="osee_index">
			<AppliesTo id="QUERY_ID"/>
		</Index>
	</Table>
	
	<TableDescription referenceTable="OSEE_JOIN_TRANSACTION">
		<Note purpose="Temporary working table to improve performance of joins"/>
		<Column id="QUERY_ID" 		description="randomly generated identifier for this short-lived join"/>
		<Column id="TRANSACTION_ID" 		description="application specific INTEGER identifier"/>
		<Column id="GAMMA_ID" 		description="application specific INTEGER identifier"/>
		<Column id="INSERT_TIME" 	description="time this join query was started"/>
	</TableDescription>
</TableConfig>

Back to the top