rtm-ontopia 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ net.ontopia.topicmaps.impl.rdbms.Database=oracle9i
2
+ net.ontopia.topicmaps.impl.rdbms.ConnectionString=jdbc:oracle:thin:@127.0.0.1:1521:TOPICMAPS
3
+ net.ontopia.topicmaps.impl.rdbms.DriverClass=oracle.jdbc.driver.OracleDriver
4
+
5
+ net.ontopia.topicmaps.impl.rdbms.UserName=foo
6
+ net.ontopia.topicmaps.impl.rdbms.Password=bar
7
+
8
+ net.ontopia.topicmaps.impl.rdbms.ConnectionPool=true
@@ -0,0 +1,8 @@
1
+ net.ontopia.topicmaps.impl.rdbms.Database=postgresql
2
+ net.ontopia.topicmaps.impl.rdbms.ConnectionString=jdbc:postgresql:topicmaps
3
+ net.ontopia.topicmaps.impl.rdbms.DriverClass=org.postgresql.Driver
4
+
5
+ net.ontopia.topicmaps.impl.rdbms.UserName=foo
6
+ net.ontopia.topicmaps.impl.rdbms.Password=bar
7
+
8
+ net.ontopia.topicmaps.impl.rdbms.ConnectionPool=true
@@ -0,0 +1,8 @@
1
+ net.ontopia.topicmaps.impl.rdbms.Database=sqlserver
2
+ net.ontopia.topicmaps.impl.rdbms.ConnectionString=jdbcspy:jdbc:sqlserver://127.0.0.1\\ONTOPIA;databaseName=topicmaps;lockTimeout=60000
3
+ net.ontopia.topicmaps.impl.rdbms.DriverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver
4
+
5
+ net.ontopia.topicmaps.impl.rdbms.UserName=foo
6
+ net.ontopia.topicmaps.impl.rdbms.Password=bar
7
+
8
+ net.ontopia.topicmaps.impl.rdbms.ConnectionPool=true
@@ -0,0 +1,154 @@
1
+ create table TM_SUBJECT_LOCATORS (
2
+ topic_id integer not null,
3
+ address varchar(512) not null
4
+ );
5
+
6
+ create table TM_VARIANT_NAME_SCOPE (
7
+ scoped_id integer not null,
8
+ theme_id integer not null,
9
+ constraint TM_VARIANT_NAME_SCOPE_pkey primary key (scoped_id, theme_id)
10
+ );
11
+
12
+ create table TM_SUBJECT_IDENTIFIERS (
13
+ topic_id integer not null,
14
+ address varchar(512) not null
15
+ );
16
+
17
+ create table TM_TOPIC_MAP (
18
+ id integer not null,
19
+ reifier_id integer null,
20
+ title varchar(128) null,
21
+ base_address varchar(512) null,
22
+ comments varchar(2048) null,
23
+ constraint TM_TOPIC_MAP_pkey primary key (id)
24
+ );
25
+
26
+ create table TM_TOPIC_NAME_SCOPE (
27
+ scoped_id integer not null,
28
+ theme_id integer not null,
29
+ constraint TM_TOPIC_NAME_SCOPE_pkey primary key (scoped_id, theme_id)
30
+ );
31
+
32
+ create table TM_TOPIC_NAME (
33
+ id integer not null,
34
+ topic_id integer not null,
35
+ topicmap_id integer not null,
36
+ reifier_id integer null,
37
+ type_id integer null,
38
+ content varchar(2048) null,
39
+ constraint TM_TOPIC_NAME_pkey primary key (id)
40
+ );
41
+
42
+ create table TM_OCCURRENCE (
43
+ id integer not null,
44
+ topic_id integer not null,
45
+ topicmap_id integer not null,
46
+ reifier_id integer null,
47
+ type_id integer null,
48
+ datatype_address varchar(512) null,
49
+ length integer null,
50
+ hashcode integer null,
51
+ content clob null,
52
+ constraint TM_OCCURRENCE_pkey primary key (id)
53
+ );
54
+
55
+ create table TM_ASSOCIATION_SCOPE (
56
+ scoped_id integer not null,
57
+ theme_id integer not null,
58
+ constraint TM_ASSOCIATION_SCOPE_pkey primary key (scoped_id, theme_id)
59
+ );
60
+
61
+ create table TM_ITEM_IDENTIFIERS (
62
+ class varchar(1) not null,
63
+ tmobject_id integer not null,
64
+ topicmap_id integer not null,
65
+ address varchar(512) not null
66
+ );
67
+
68
+ create table TM_ADMIN_SEQUENCE (
69
+ seq_name varchar(32) not null,
70
+ seq_count integer not null,
71
+ constraint TM_ADMIN_SEQUENCE_pkey primary key (seq_name)
72
+ );
73
+
74
+ create table TM_TOPIC (
75
+ id integer not null,
76
+ topicmap_id integer not null,
77
+ reified_id varchar(32) null,
78
+ constraint TM_TOPIC_pkey primary key (id)
79
+ );
80
+
81
+ create table TM_OCCURRENCE_SCOPE (
82
+ scoped_id integer not null,
83
+ theme_id integer not null,
84
+ constraint TM_OCCURRENCE_SCOPE_pkey primary key (scoped_id, theme_id)
85
+ );
86
+
87
+ create table TM_VARIANT_NAME (
88
+ id integer not null,
89
+ name_id integer not null,
90
+ topicmap_id integer not null,
91
+ reifier_id integer null,
92
+ datatype_address varchar(512) null,
93
+ length integer null,
94
+ hashcode integer null,
95
+ content clob null,
96
+ constraint TM_VARIANT_NAME_pkey primary key (id)
97
+ );
98
+
99
+ create table TM_ASSOCIATION (
100
+ id integer not null,
101
+ topicmap_id integer not null,
102
+ reifier_id integer null,
103
+ type_id integer null,
104
+ constraint TM_ASSOCIATION_pkey primary key (id)
105
+ );
106
+
107
+ create table TM_ASSOCIATION_ROLE (
108
+ id integer not null,
109
+ assoc_id integer not null,
110
+ topicmap_id integer not null,
111
+ reifier_id integer null,
112
+ type_id integer null,
113
+ player_id integer null,
114
+ constraint TM_ASSOCIATION_ROLE_pkey primary key (id)
115
+ );
116
+
117
+ create table TM_TOPIC_TYPES (
118
+ topic_id integer not null,
119
+ type_id integer not null,
120
+ constraint TM_TOPIC_TYPES_pkey primary key (topic_id, type_id)
121
+ );
122
+
123
+
124
+ create index TM_SUBJECT_LOCATORS_IX_oa on TM_SUBJECT_LOCATORS(topic_id, address);
125
+ create index TM_SUBJECT_LOCATORS_IX_am on TM_SUBJECT_LOCATORS(address, topic_id);
126
+ create index TM_VARIANT_NAME_SCOPE_IX_hs on TM_VARIANT_NAME_SCOPE(theme_id, scoped_id);
127
+ create index TM_SUBJECT_IDENTIFIERS_IX_oa on TM_SUBJECT_IDENTIFIERS(topic_id, address);
128
+ create index TM_SUBJECT_IDENTIFIERS_IX_am on TM_SUBJECT_IDENTIFIERS(address, topic_id);
129
+ create index TM_TOPIC_MAP_IX_ai on TM_TOPIC_MAP(base_address, id);
130
+ create index TM_TOPIC_NAME_SCOPE_IX_hs on TM_TOPIC_NAME_SCOPE(theme_id, scoped_id);
131
+ create index TM_TOPIC_NAME_IX_o on TM_TOPIC_NAME(topic_id);
132
+ create index TM_TOPIC_NAME_IX_myi on TM_TOPIC_NAME(topicmap_id, type_id, id);
133
+ create index TM_TOPIC_NAME_IX_mvi on TM_TOPIC_NAME(topicmap_id, content, id);
134
+ create index TM_OCCURRENCE_IX_o on TM_OCCURRENCE(topic_id);
135
+ create index TM_OCCURRENCE_IX_myi on TM_OCCURRENCE(topicmap_id, type_id, id);
136
+ create index TM_OCCURRENCE_IX_mhi on TM_OCCURRENCE(topicmap_id, hashcode, id);
137
+ create index TM_ASSOCIATION_SCOPE_IX_hs on TM_ASSOCIATION_SCOPE(theme_id, scoped_id);
138
+ create index TM_ITEM_IDENTIFIERS_IX_o on TM_ITEM_IDENTIFIERS(tmobject_id);
139
+ create index TM_ITEM_IDENTIFIERS_IX_maco on TM_ITEM_IDENTIFIERS(topicmap_id, address, class, tmobject_id);
140
+ create index TM_TOPIC_IX_im on TM_TOPIC(id, topicmap_id);
141
+ create index TM_OCCURRENCE_SCOPE_IX_hs on TM_OCCURRENCE_SCOPE(theme_id, scoped_id);
142
+ create index TM_VARIANT_NAME_IX_o on TM_VARIANT_NAME(name_id);
143
+ create index TM_VARIANT_NAME_IX_mhi on TM_VARIANT_NAME(topicmap_id, hashcode, id);
144
+ create index TM_ASSOCIATION_IX_myi on TM_ASSOCIATION(topicmap_id, type_id, id);
145
+ create index TM_ASSOCIATION_ROLE_IX_o on TM_ASSOCIATION_ROLE(assoc_id);
146
+ create index TM_ASSOCIATION_ROLE_IX_io on TM_ASSOCIATION_ROLE(id, assoc_id);
147
+ create index TM_ASSOCIATION_ROLE_IX_t on TM_ASSOCIATION_ROLE(player_id);
148
+ create index TM_ASSOCIATION_ROLE_IX_it on TM_ASSOCIATION_ROLE(id, player_id);
149
+ create index TM_ASSOCIATION_ROLE_IX_myi on TM_ASSOCIATION_ROLE(topicmap_id, type_id, id);
150
+ create index TM_ASSOCIATION_ROLE_IX_mtyio on TM_ASSOCIATION_ROLE(topicmap_id, player_id, type_id, id, assoc_id);
151
+ create index TM_TOPIC_TYPES_IX_yt on TM_TOPIC_TYPES(type_id, topic_id);
152
+
153
+ insert into TM_ADMIN_SEQUENCE values ('<GLOBAL>', 0);
154
+
@@ -0,0 +1,16 @@
1
+ drop table TM_SUBJECT_LOCATORS;
2
+ drop table TM_VARIANT_NAME_SCOPE;
3
+ drop table TM_SUBJECT_IDENTIFIERS;
4
+ drop table TM_TOPIC_MAP;
5
+ drop table TM_TOPIC_NAME_SCOPE;
6
+ drop table TM_TOPIC_NAME;
7
+ drop table TM_OCCURRENCE;
8
+ drop table TM_ASSOCIATION_SCOPE;
9
+ drop table TM_ITEM_IDENTIFIERS;
10
+ drop table TM_ADMIN_SEQUENCE;
11
+ drop table TM_TOPIC;
12
+ drop table TM_OCCURRENCE_SCOPE;
13
+ drop table TM_VARIANT_NAME;
14
+ drop table TM_ASSOCIATION;
15
+ drop table TM_ASSOCIATION_ROLE;
16
+ drop table TM_TOPIC_TYPES;
@@ -0,0 +1,154 @@
1
+ create table TM_SUBJECT_LOCATORS (
2
+ topic_id integer not null,
3
+ address varchar(512) not null
4
+ );
5
+
6
+ create table TM_VARIANT_NAME_SCOPE (
7
+ scoped_id integer not null,
8
+ theme_id integer not null,
9
+ constraint TM_VARIANT_NAME_SCOPE_pkey primary key (scoped_id, theme_id)
10
+ );
11
+
12
+ create table TM_SUBJECT_IDENTIFIERS (
13
+ topic_id integer not null,
14
+ address varchar(512) not null
15
+ );
16
+
17
+ create table TM_TOPIC_MAP (
18
+ id integer not null,
19
+ reifier_id integer null,
20
+ title varchar(128) null,
21
+ base_address varchar(512) null,
22
+ comments varchar(2048) null,
23
+ constraint TM_TOPIC_MAP_pkey primary key (id)
24
+ );
25
+
26
+ create table TM_TOPIC_NAME_SCOPE (
27
+ scoped_id integer not null,
28
+ theme_id integer not null,
29
+ constraint TM_TOPIC_NAME_SCOPE_pkey primary key (scoped_id, theme_id)
30
+ );
31
+
32
+ create table TM_TOPIC_NAME (
33
+ id integer not null,
34
+ topic_id integer not null,
35
+ topicmap_id integer not null,
36
+ reifier_id integer null,
37
+ type_id integer null,
38
+ content varchar(2048) null,
39
+ constraint TM_TOPIC_NAME_pkey primary key (id)
40
+ );
41
+
42
+ create table TM_OCCURRENCE (
43
+ id integer not null,
44
+ topic_id integer not null,
45
+ topicmap_id integer not null,
46
+ reifier_id integer null,
47
+ type_id integer null,
48
+ datatype_address varchar(512) null,
49
+ length integer null,
50
+ hashcode integer null,
51
+ content clob null,
52
+ constraint TM_OCCURRENCE_pkey primary key (id)
53
+ );
54
+
55
+ create table TM_ASSOCIATION_SCOPE (
56
+ scoped_id integer not null,
57
+ theme_id integer not null,
58
+ constraint TM_ASSOCIATION_SCOPE_pkey primary key (scoped_id, theme_id)
59
+ );
60
+
61
+ create table TM_ITEM_IDENTIFIERS (
62
+ class varchar(1) not null,
63
+ tmobject_id integer not null,
64
+ topicmap_id integer not null,
65
+ address varchar(512) not null
66
+ );
67
+
68
+ create table TM_ADMIN_SEQUENCE (
69
+ seq_name varchar(32) not null,
70
+ seq_count integer not null,
71
+ constraint TM_ADMIN_SEQUENCE_pkey primary key (seq_name)
72
+ );
73
+
74
+ create table TM_TOPIC (
75
+ id integer not null,
76
+ topicmap_id integer not null,
77
+ reified_id varchar(32) null,
78
+ constraint TM_TOPIC_pkey primary key (id)
79
+ );
80
+
81
+ create table TM_OCCURRENCE_SCOPE (
82
+ scoped_id integer not null,
83
+ theme_id integer not null,
84
+ constraint TM_OCCURRENCE_SCOPE_pkey primary key (scoped_id, theme_id)
85
+ );
86
+
87
+ create table TM_VARIANT_NAME (
88
+ id integer not null,
89
+ name_id integer not null,
90
+ topicmap_id integer not null,
91
+ reifier_id integer null,
92
+ datatype_address varchar(512) null,
93
+ length integer null,
94
+ hashcode integer null,
95
+ content clob null,
96
+ constraint TM_VARIANT_NAME_pkey primary key (id)
97
+ );
98
+
99
+ create table TM_ASSOCIATION (
100
+ id integer not null,
101
+ topicmap_id integer not null,
102
+ reifier_id integer null,
103
+ type_id integer null,
104
+ constraint TM_ASSOCIATION_pkey primary key (id)
105
+ );
106
+
107
+ create table TM_ASSOCIATION_ROLE (
108
+ id integer not null,
109
+ assoc_id integer not null,
110
+ topicmap_id integer not null,
111
+ reifier_id integer null,
112
+ type_id integer null,
113
+ player_id integer null,
114
+ constraint TM_ASSOCIATION_ROLE_pkey primary key (id)
115
+ );
116
+
117
+ create table TM_TOPIC_TYPES (
118
+ topic_id integer not null,
119
+ type_id integer not null,
120
+ constraint TM_TOPIC_TYPES_pkey primary key (topic_id, type_id)
121
+ );
122
+
123
+
124
+ create index TM_SUBJECT_LOCATORS_IX_oa on TM_SUBJECT_LOCATORS(topic_id, address);
125
+ create index TM_SUBJECT_LOCATORS_IX_am on TM_SUBJECT_LOCATORS(address, topic_id);
126
+ create index TM_VARIANT_NAME_SCOPE_IX_hs on TM_VARIANT_NAME_SCOPE(theme_id, scoped_id);
127
+ create index TM_SUBJECT_IDENTIFIERS_IX_oa on TM_SUBJECT_IDENTIFIERS(topic_id, address);
128
+ create index TM_SUBJECT_IDENTIFIERS_IX_am on TM_SUBJECT_IDENTIFIERS(address, topic_id);
129
+ create index TM_TOPIC_MAP_IX_ai on TM_TOPIC_MAP(base_address, id);
130
+ create index TM_TOPIC_NAME_SCOPE_IX_hs on TM_TOPIC_NAME_SCOPE(theme_id, scoped_id);
131
+ create index TM_TOPIC_NAME_IX_o on TM_TOPIC_NAME(topic_id);
132
+ create index TM_TOPIC_NAME_IX_myi on TM_TOPIC_NAME(topicmap_id, type_id, id);
133
+ create index TM_TOPIC_NAME_IX_mvi on TM_TOPIC_NAME(topicmap_id, content, id);
134
+ create index TM_OCCURRENCE_IX_o on TM_OCCURRENCE(topic_id);
135
+ create index TM_OCCURRENCE_IX_myi on TM_OCCURRENCE(topicmap_id, type_id, id);
136
+ create index TM_OCCURRENCE_IX_mhi on TM_OCCURRENCE(topicmap_id, hashcode, id);
137
+ create index TM_ASSOCIATION_SCOPE_IX_hs on TM_ASSOCIATION_SCOPE(theme_id, scoped_id);
138
+ create index TM_ITEM_IDENTIFIERS_IX_o on TM_ITEM_IDENTIFIERS(tmobject_id);
139
+ create index TM_ITEM_IDENTIFIERS_IX_maco on TM_ITEM_IDENTIFIERS(topicmap_id, address, class, tmobject_id);
140
+ create index TM_TOPIC_IX_im on TM_TOPIC(id, topicmap_id);
141
+ create index TM_OCCURRENCE_SCOPE_IX_hs on TM_OCCURRENCE_SCOPE(theme_id, scoped_id);
142
+ create index TM_VARIANT_NAME_IX_o on TM_VARIANT_NAME(name_id);
143
+ create index TM_VARIANT_NAME_IX_mhi on TM_VARIANT_NAME(topicmap_id, hashcode, id);
144
+ create index TM_ASSOCIATION_IX_myi on TM_ASSOCIATION(topicmap_id, type_id, id);
145
+ create index TM_ASSOCIATION_ROLE_IX_o on TM_ASSOCIATION_ROLE(assoc_id);
146
+ create index TM_ASSOCIATION_ROLE_IX_io on TM_ASSOCIATION_ROLE(id, assoc_id);
147
+ create index TM_ASSOCIATION_ROLE_IX_t on TM_ASSOCIATION_ROLE(player_id);
148
+ create index TM_ASSOCIATION_ROLE_IX_it on TM_ASSOCIATION_ROLE(id, player_id);
149
+ create index TM_ASSOCIATION_ROLE_IX_myi on TM_ASSOCIATION_ROLE(topicmap_id, type_id, id);
150
+ create index TM_ASSOCIATION_ROLE_IX_mtyio on TM_ASSOCIATION_ROLE(topicmap_id, player_id, type_id, id, assoc_id);
151
+ create index TM_TOPIC_TYPES_IX_yt on TM_TOPIC_TYPES(type_id, topic_id);
152
+
153
+ insert into TM_ADMIN_SEQUENCE values ('<GLOBAL>', 0);
154
+
@@ -0,0 +1,16 @@
1
+ drop table TM_SUBJECT_LOCATORS;
2
+ drop table TM_VARIANT_NAME_SCOPE;
3
+ drop table TM_SUBJECT_IDENTIFIERS;
4
+ drop table TM_TOPIC_MAP;
5
+ drop table TM_TOPIC_NAME_SCOPE;
6
+ drop table TM_TOPIC_NAME;
7
+ drop table TM_OCCURRENCE;
8
+ drop table TM_ASSOCIATION_SCOPE;
9
+ drop table TM_ITEM_IDENTIFIERS;
10
+ drop table TM_ADMIN_SEQUENCE;
11
+ drop table TM_TOPIC;
12
+ drop table TM_OCCURRENCE_SCOPE;
13
+ drop table TM_VARIANT_NAME;
14
+ drop table TM_ASSOCIATION;
15
+ drop table TM_ASSOCIATION_ROLE;
16
+ drop table TM_TOPIC_TYPES;
@@ -0,0 +1,16 @@
1
+ drop table TM_SUBJECT_LOCATORS;
2
+ drop table TM_VARIANT_NAME_SCOPE;
3
+ drop table TM_SUBJECT_IDENTIFIERS;
4
+ drop table TM_TOPIC_MAP;
5
+ drop table TM_TOPIC_NAME_SCOPE;
6
+ drop table TM_TOPIC_NAME;
7
+ drop table TM_OCCURRENCE;
8
+ drop table TM_ASSOCIATION_SCOPE;
9
+ drop table TM_ITEM_IDENTIFIERS;
10
+ drop table TM_ADMIN_SEQUENCE;
11
+ drop table TM_TOPIC;
12
+ drop table TM_OCCURRENCE_SCOPE;
13
+ drop table TM_VARIANT_NAME;
14
+ drop table TM_ASSOCIATION;
15
+ drop table TM_ASSOCIATION_ROLE;
16
+ drop table TM_TOPIC_TYPES;
@@ -0,0 +1,202 @@
1
+ create table TM_SUBJECT_LOCATORS (
2
+ topic_id integer not null,
3
+ address varchar2(512) not null
4
+ );
5
+
6
+ create table TM_VARIANT_NAME_SCOPE (
7
+ scoped_id integer not null,
8
+ theme_id integer not null,
9
+ constraint TM_VARIANT_NAME_SCOPE_pkey primary key (scoped_id, theme_id)
10
+ );
11
+
12
+ create table TM_SUBJECT_IDENTIFIERS (
13
+ topic_id integer not null,
14
+ address varchar2(512) not null
15
+ );
16
+
17
+ create table TM_TOPIC_MAP (
18
+ id integer not null,
19
+ reifier_id integer,
20
+ title varchar2(128),
21
+ base_address varchar2(512),
22
+ comments varchar2(4000),
23
+ constraint TM_TOPIC_MAP_pkey primary key (id)
24
+ );
25
+
26
+ create table TM_TOPIC_NAME_SCOPE (
27
+ scoped_id integer not null,
28
+ theme_id integer not null,
29
+ constraint TM_TOPIC_NAME_SCOPE_pkey primary key (scoped_id, theme_id)
30
+ );
31
+
32
+ create table TM_TOPIC_NAME (
33
+ id integer not null,
34
+ topic_id integer not null,
35
+ topicmap_id integer not null,
36
+ reifier_id integer,
37
+ type_id integer,
38
+ content varchar2(4000),
39
+ constraint TM_TOPIC_NAME_pkey primary key (id)
40
+ );
41
+
42
+ create table TM_OCCURRENCE (
43
+ id integer not null,
44
+ topic_id integer not null,
45
+ topicmap_id integer not null,
46
+ reifier_id integer,
47
+ type_id integer,
48
+ datatype_address varchar2(512),
49
+ length integer,
50
+ hashcode integer,
51
+ content clob,
52
+ constraint TM_OCCURRENCE_pkey primary key (id)
53
+ );
54
+
55
+ create table TM_ASSOCIATION_SCOPE (
56
+ scoped_id integer not null,
57
+ theme_id integer not null,
58
+ constraint TM_ASSOCIATION_SCOPE_pkey primary key (scoped_id, theme_id)
59
+ );
60
+
61
+ create table TM_ITEM_IDENTIFIERS (
62
+ class varchar2(1) not null,
63
+ tmobject_id integer not null,
64
+ topicmap_id integer not null,
65
+ address varchar2(512) not null
66
+ );
67
+
68
+ create table TM_ADMIN_SEQUENCE (
69
+ seq_name varchar2(32) not null,
70
+ seq_count integer not null,
71
+ constraint TM_ADMIN_SEQUENCE_pkey primary key (seq_name)
72
+ );
73
+
74
+ create table TM_TOPIC (
75
+ id integer not null,
76
+ topicmap_id integer not null,
77
+ reified_id varchar2(32),
78
+ constraint TM_TOPIC_pkey primary key (id)
79
+ );
80
+
81
+ create table TM_OCCURRENCE_SCOPE (
82
+ scoped_id integer not null,
83
+ theme_id integer not null,
84
+ constraint TM_OCCURRENCE_SCOPE_pkey primary key (scoped_id, theme_id)
85
+ );
86
+
87
+ create table TM_VARIANT_NAME (
88
+ id integer not null,
89
+ name_id integer not null,
90
+ topicmap_id integer not null,
91
+ reifier_id integer,
92
+ datatype_address varchar2(512),
93
+ length integer,
94
+ hashcode integer,
95
+ content clob,
96
+ constraint TM_VARIANT_NAME_pkey primary key (id)
97
+ );
98
+
99
+ create table TM_ASSOCIATION (
100
+ id integer not null,
101
+ topicmap_id integer not null,
102
+ reifier_id integer,
103
+ type_id integer,
104
+ constraint TM_ASSOCIATION_pkey primary key (id)
105
+ );
106
+
107
+ create table TM_ASSOCIATION_ROLE (
108
+ id integer not null,
109
+ assoc_id integer not null,
110
+ topicmap_id integer not null,
111
+ reifier_id integer,
112
+ type_id integer,
113
+ player_id integer,
114
+ constraint TM_ASSOCIATION_ROLE_pkey primary key (id)
115
+ );
116
+
117
+ create table TM_TOPIC_TYPES (
118
+ topic_id integer not null,
119
+ type_id integer not null,
120
+ constraint TM_TOPIC_TYPES_pkey primary key (topic_id, type_id)
121
+ );
122
+
123
+
124
+ /*
125
+ alter table TM_SUBJECT_LOCATORS add constraint FK_TM_SUBJECT_LOCATORS_1 foreign key (topic_id) references TM_TOPIC (id) deferrable initially deferred;
126
+ alter table TM_VARIANT_NAME_SCOPE add constraint FK_TM_VARIANT_NAME_SCOPE_1 foreign key (scoped_id) references TM_VARIANT_NAME (id) deferrable initially deferred;
127
+ alter table TM_VARIANT_NAME_SCOPE add constraint FK_TM_VARIANT_NAME_SCOPE_2 foreign key (theme_id) references TM_TOPIC (id) deferrable initially deferred;
128
+ alter table TM_SUBJECT_IDENTIFIERS add constraint FK_TM_SUBJECT_IDENTIFIERS_1 foreign key (topic_id) references TM_TOPIC (id) deferrable initially deferred;
129
+ alter table TM_TOPIC_MAP add constraint FK_TM_TOPIC_MAP_1 foreign key (reifier_id) references TM_TOPIC (id) deferrable initially deferred;
130
+ alter table TM_TOPIC_NAME_SCOPE add constraint FK_TM_TOPIC_NAME_SCOPE_1 foreign key (scoped_id) references TM_TOPIC_NAME (id) deferrable initially deferred;
131
+ alter table TM_TOPIC_NAME_SCOPE add constraint FK_TM_TOPIC_NAME_SCOPE_2 foreign key (theme_id) references TM_TOPIC (id) deferrable initially deferred;
132
+ alter table TM_TOPIC_NAME add constraint FK_TM_TOPIC_NAME_1 foreign key (topic_id) references TM_TOPIC (id) deferrable initially deferred;
133
+ alter table TM_TOPIC_NAME add constraint FK_TM_TOPIC_NAME_2 foreign key (topicmap_id) references TM_TOPIC_MAP (id) deferrable initially deferred;
134
+ alter table TM_TOPIC_NAME add constraint FK_TM_TOPIC_NAME_3 foreign key (reifier_id) references TM_TOPIC (id) deferrable initially deferred;
135
+ alter table TM_TOPIC_NAME add constraint FK_TM_TOPIC_NAME_4 foreign key (type_id) references TM_TOPIC (id) deferrable initially deferred;
136
+ alter table TM_OCCURRENCE add constraint FK_TM_OCCURRENCE_1 foreign key (topic_id) references TM_TOPIC (id) deferrable initially deferred;
137
+ alter table TM_OCCURRENCE add constraint FK_TM_OCCURRENCE_2 foreign key (topicmap_id) references TM_TOPIC_MAP (id) deferrable initially deferred;
138
+ alter table TM_OCCURRENCE add constraint FK_TM_OCCURRENCE_3 foreign key (reifier_id) references TM_TOPIC (id) deferrable initially deferred;
139
+ alter table TM_OCCURRENCE add constraint FK_TM_OCCURRENCE_4 foreign key (type_id) references TM_TOPIC (id) deferrable initially deferred;
140
+ alter table TM_ASSOCIATION_SCOPE add constraint FK_TM_ASSOCIATION_SCOPE_1 foreign key (scoped_id) references TM_ASSOCIATION (id) deferrable initially deferred;
141
+ alter table TM_ASSOCIATION_SCOPE add constraint FK_TM_ASSOCIATION_SCOPE_2 foreign key (theme_id) references TM_TOPIC (id) deferrable initially deferred;
142
+ alter table TM_ITEM_IDENTIFIERS add constraint FK_TM_ITEM_IDENTIFIERS_1 foreign key (topicmap_id) references TM_TOPIC_MAP (id) deferrable initially deferred;
143
+ alter table TM_TOPIC add constraint FK_TM_TOPIC_1 foreign key (topicmap_id) references TM_TOPIC_MAP (id) deferrable initially deferred;
144
+ alter table TM_OCCURRENCE_SCOPE add constraint FK_TM_OCCURRENCE_SCOPE_1 foreign key (scoped_id) references TM_OCCURRENCE (id) deferrable initially deferred;
145
+ alter table TM_OCCURRENCE_SCOPE add constraint FK_TM_OCCURRENCE_SCOPE_2 foreign key (theme_id) references TM_TOPIC (id) deferrable initially deferred;
146
+ alter table TM_VARIANT_NAME add constraint FK_TM_VARIANT_NAME_1 foreign key (name_id) references TM_TOPIC_NAME (id) deferrable initially deferred;
147
+ alter table TM_VARIANT_NAME add constraint FK_TM_VARIANT_NAME_2 foreign key (topicmap_id) references TM_TOPIC_MAP (id) deferrable initially deferred;
148
+ alter table TM_VARIANT_NAME add constraint FK_TM_VARIANT_NAME_3 foreign key (reifier_id) references TM_TOPIC (id) deferrable initially deferred;
149
+ alter table TM_ASSOCIATION add constraint FK_TM_ASSOCIATION_1 foreign key (topicmap_id) references TM_TOPIC_MAP (id) deferrable initially deferred;
150
+ alter table TM_ASSOCIATION add constraint FK_TM_ASSOCIATION_2 foreign key (reifier_id) references TM_TOPIC (id) deferrable initially deferred;
151
+ alter table TM_ASSOCIATION add constraint FK_TM_ASSOCIATION_3 foreign key (type_id) references TM_TOPIC (id) deferrable initially deferred;
152
+ alter table TM_ASSOCIATION_ROLE add constraint FK_TM_ASSOCIATION_ROLE_1 foreign key (assoc_id) references TM_ASSOCIATION (id) deferrable initially deferred;
153
+ alter table TM_ASSOCIATION_ROLE add constraint FK_TM_ASSOCIATION_ROLE_2 foreign key (topicmap_id) references TM_TOPIC_MAP (id) deferrable initially deferred;
154
+ alter table TM_ASSOCIATION_ROLE add constraint FK_TM_ASSOCIATION_ROLE_3 foreign key (reifier_id) references TM_TOPIC (id) deferrable initially deferred;
155
+ alter table TM_ASSOCIATION_ROLE add constraint FK_TM_ASSOCIATION_ROLE_4 foreign key (type_id) references TM_TOPIC (id) deferrable initially deferred;
156
+ alter table TM_ASSOCIATION_ROLE add constraint FK_TM_ASSOCIATION_ROLE_5 foreign key (player_id) references TM_TOPIC (id) deferrable initially deferred;
157
+ alter table TM_TOPIC_TYPES add constraint FK_TM_TOPIC_TYPES_1 foreign key (topic_id) references TM_TOPIC (id) deferrable initially deferred;
158
+ alter table TM_TOPIC_TYPES add constraint FK_TM_TOPIC_TYPES_2 foreign key (type_id) references TM_TOPIC (id) deferrable initially deferred;
159
+ */
160
+
161
+ create index TM_SUBJECT_LOCATORS_IX_oa on TM_SUBJECT_LOCATORS(topic_id, address);
162
+ create index TM_SUBJECT_LOCATORS_IX_am on TM_SUBJECT_LOCATORS(address, topic_id);
163
+ create index TM_VARIANT_NAME_SCOPE_IX_hs on TM_VARIANT_NAME_SCOPE(theme_id, scoped_id);
164
+ create index TM_SUBJECT_IDENTIFIERS_IX_oa on TM_SUBJECT_IDENTIFIERS(topic_id, address);
165
+ create index TM_SUBJECT_IDENTIFIERS_IX_am on TM_SUBJECT_IDENTIFIERS(address, topic_id);
166
+ create index TM_TOPIC_MAP_IX_ai on TM_TOPIC_MAP(base_address, id);
167
+ create index TM_TOPIC_NAME_SCOPE_IX_hs on TM_TOPIC_NAME_SCOPE(theme_id, scoped_id);
168
+ create index TM_TOPIC_NAME_IX_o on TM_TOPIC_NAME(topic_id);
169
+ create index TM_TOPIC_NAME_IX_myi on TM_TOPIC_NAME(topicmap_id, type_id, id);
170
+ create index TM_TOPIC_NAME_IX_mvi on TM_TOPIC_NAME(topicmap_id, content, id);
171
+ create index TM_OCCURRENCE_IX_o on TM_OCCURRENCE(topic_id);
172
+ create index TM_OCCURRENCE_IX_myi on TM_OCCURRENCE(topicmap_id, type_id, id);
173
+ create index TM_OCCURRENCE_IX_mhi on TM_OCCURRENCE(topicmap_id, hashcode, id);
174
+ create index TM_ASSOCIATION_SCOPE_IX_hs on TM_ASSOCIATION_SCOPE(theme_id, scoped_id);
175
+ create index TM_ITEM_IDENTIFIERS_IX_o on TM_ITEM_IDENTIFIERS(tmobject_id);
176
+ create index TM_ITEM_IDENTIFIERS_IX_maco on TM_ITEM_IDENTIFIERS(topicmap_id, address, class, tmobject_id);
177
+ create index TM_TOPIC_IX_im on TM_TOPIC(id, topicmap_id);
178
+ create index TM_OCCURRENCE_SCOPE_IX_hs on TM_OCCURRENCE_SCOPE(theme_id, scoped_id);
179
+ create index TM_VARIANT_NAME_IX_o on TM_VARIANT_NAME(name_id);
180
+ create index TM_VARIANT_NAME_IX_mhi on TM_VARIANT_NAME(topicmap_id, hashcode, id);
181
+ create index TM_ASSOCIATION_IX_myi on TM_ASSOCIATION(topicmap_id, type_id, id);
182
+ create index TM_ASSOCIATION_ROLE_IX_o on TM_ASSOCIATION_ROLE(assoc_id);
183
+ create index TM_ASSOCIATION_ROLE_IX_io on TM_ASSOCIATION_ROLE(id, assoc_id);
184
+ create index TM_ASSOCIATION_ROLE_IX_t on TM_ASSOCIATION_ROLE(player_id);
185
+ create index TM_ASSOCIATION_ROLE_IX_it on TM_ASSOCIATION_ROLE(id, player_id);
186
+ create index TM_ASSOCIATION_ROLE_IX_myi on TM_ASSOCIATION_ROLE(topicmap_id, type_id, id);
187
+ create index TM_ASSOCIATION_ROLE_IX_mtyio on TM_ASSOCIATION_ROLE(topicmap_id, player_id, type_id, id, assoc_id);
188
+ create index TM_TOPIC_TYPES_IX_yt on TM_TOPIC_TYPES(type_id, topic_id);
189
+
190
+ insert into TM_ADMIN_SEQUENCE values ('<GLOBAL>', 0);
191
+
192
+ create or replace function tm_clob_value(val clob)
193
+ return varchar2 deterministic as
194
+ retval varchar2(4000);
195
+ begin
196
+ retval := dbms_lob.substr(val, 4000, 1);
197
+ return retval;
198
+ end;
199
+ /
200
+ create index CLOB_TM_OCCURRENCE on TM_OCCURRENCE(tm_clob_value(content));
201
+ create index CLOB_TM_VARIANT_NAME on TM_VARIANT_NAME(tm_clob_value(content));
202
+