summary refs log tree commit diff stats
path: root/generator
diff options
context:
space:
mode:
Diffstat (limited to 'generator')
-rw-r--r--generator/schema.sql68
1 files changed, 34 insertions, 34 deletions
diff --git a/generator/schema.sql b/generator/schema.sql index c07bf57..5b42d52 100644 --- a/generator/schema.sql +++ b/generator/schema.sql
@@ -12,55 +12,55 @@ CREATE TABLE `hypernymy` (
12 `hyponym_id` INTEGER NOT NULL 12 `hyponym_id` INTEGER NOT NULL
13); 13);
14 14
15CREATE INDEX `hyponym_of` ON `hypernymy`(`hypernym_id`); 15CREATE INDEX `hyponym_of` ON `hypernymy`(`hypernym_id`,`hyponym_id`);
16CREATE INDEX `hypernym_of` ON `hypernymy`(`hyponym_id`); 16CREATE INDEX `hypernym_of` ON `hypernymy`(`hyponym_id`,`hypernym_id`);
17 17
18CREATE TABLE `instantiation` ( 18CREATE TABLE `instantiation` (
19 `class_id` INTEGER NOT NULL, 19 `class_id` INTEGER NOT NULL,
20 `instance_id` INTEGER NOT NULL 20 `instance_id` INTEGER NOT NULL
21); 21);
22 22
23CREATE INDEX `instance_of` ON `instantiation`(`class_id`); 23CREATE INDEX `instance_of` ON `instantiation`(`class_id`,`instance_id`);
24CREATE INDEX `class_of` ON `instantiation`(`instance_id`); 24CREATE INDEX `class_of` ON `instantiation`(`instance_id`,`class_id`);
25 25
26CREATE TABLE `member_meronymy` ( 26CREATE TABLE `member_meronymy` (
27 `meronym_id` INTEGER NOT NULL, 27 `meronym_id` INTEGER NOT NULL,
28 `holonym_id` INTEGER NOT NULL 28 `holonym_id` INTEGER NOT NULL
29); 29);
30 30
31CREATE INDEX `member_holonym_of` ON `member_meronymy`(`meronym_id`); 31CREATE INDEX `member_holonym_of` ON `member_meronymy`(`meronym_id`,`holonym_id`);
32CREATE INDEX `member_meronym_of` ON `member_meronymy`(`holonym_id`); 32CREATE INDEX `member_meronym_of` ON `member_meronymy`(`holonym_id`,`meronym_id`);
33 33
34CREATE TABLE `part_meronymy` ( 34CREATE TABLE `part_meronymy` (
35 `meronym_id` INTEGER NOT NULL, 35 `meronym_id` INTEGER NOT NULL,
36 `holonym_id` INTEGER NOT NULL 36 `holonym_id` INTEGER NOT NULL
37); 37);
38 38
39CREATE INDEX `part_holonym_of` ON `part_meronymy`(`meronym_id`); 39CREATE INDEX `part_holonym_of` ON `part_meronymy`(`meronym_id`,`holonym_id`);
40CREATE INDEX `part_meronym_of` ON `part_meronymy`(`holonym_id`); 40CREATE INDEX `part_meronym_of` ON `part_meronymy`(`holonym_id`,`meronym_id`);
41 41
42CREATE TABLE `substance_meronymy` ( 42CREATE TABLE `substance_meronymy` (
43 `meronym_id` INTEGER NOT NULL, 43 `meronym_id` INTEGER NOT NULL,
44 `holonym_id` INTEGER NOT NULL 44 `holonym_id` INTEGER NOT NULL
45); 45);
46 46
47CREATE INDEX `substance_holonym_of` ON `substance_meronymy`(`meronym_id`); 47CREATE INDEX `substance_holonym_of` ON `substance_meronymy`(`meronym_id`,`holonym_id`);
48CREATE INDEX `substance_meronym_of` ON `substance_meronymy`(`holonym_id`); 48CREATE INDEX `substance_meronym_of` ON `substance_meronymy`(`holonym_id`,`meronym_id`);
49 49
50CREATE TABLE `variation` ( 50CREATE TABLE `variation` (
51 `noun_id` INTEGER NOT NULL, 51 `noun_id` INTEGER NOT NULL,
52 `adjective_id` INTEGER NOT NULL 52 `adjective_id` INTEGER NOT NULL
53); 53);
54 54
55CREATE INDEX `variant_of` ON `variation`(`noun_id`); 55CREATE INDEX `variant_of` ON `variation`(`noun_id`,`adjective_id`);
56CREATE INDEX `attribute_of` ON `variation`(`adjective_id`); 56CREATE INDEX `attribute_of` ON `variation`(`adjective_id`,`noun_id`);
57 57
58CREATE TABLE `similarity` ( 58CREATE TABLE `similarity` (
59 `adjective_1_id` INTEGER NOT NULL, 59 `adjective_1_id` INTEGER NOT NULL,
60 `adjective_2_id` INTEGER NOT NULL 60 `adjective_2_id` INTEGER NOT NULL
61); 61);
62 62
63CREATE INDEX `similar_to` ON `similarity`(`adjective_1_id`); 63CREATE INDEX `similar_to` ON `similarity`(`adjective_1_id`,`adjective_2_id`);
64 64
65CREATE TABLE `is_a` ( 65CREATE TABLE `is_a` (
66 `notion_id` INTEGER NOT NULL, 66 `notion_id` INTEGER NOT NULL,
@@ -72,16 +72,16 @@ CREATE TABLE `entailment` (
72 `entailment_id` INTEGER NOT NULL 72 `entailment_id` INTEGER NOT NULL
73); 73);
74 74
75CREATE INDEX `entailment_of` ON `entailment`(`given_id`); 75CREATE INDEX `entailment_of` ON `entailment`(`given_id`,`entailment_id`);
76CREATE INDEX `entailed_by` ON `entailment`(`entailment_id`); 76CREATE INDEX `entailed_by` ON `entailment`(`entailment_id`,`given_id`);
77 77
78CREATE TABLE `causality` ( 78CREATE TABLE `causality` (
79 `cause_id` INTEGER NOT NULL, 79 `cause_id` INTEGER NOT NULL,
80 `effect_id` INTEGER NOT NULL 80 `effect_id` INTEGER NOT NULL
81); 81);
82 82
83CREATE INDEX `effect_of` ON `causality`(`cause_id`); 83CREATE INDEX `effect_of` ON `causality`(`cause_id`,`effect_id`);
84CREATE INDEX `cause_of` ON `causality`(`effect_id`); 84CREATE INDEX `cause_of` ON `causality`(`effect_id`,`cause_id`);
85 85
86CREATE TABLE `words` ( 86CREATE TABLE `words` (
87 `word_id` INTEGER PRIMARY KEY, 87 `word_id` INTEGER PRIMARY KEY,
@@ -101,55 +101,55 @@ CREATE TABLE `antonymy` (
101 `antonym_2_id` INTEGER NOT NULL 101 `antonym_2_id` INTEGER NOT NULL
102); 102);
103 103
104CREATE INDEX `antonym_of` ON `antonymy`(`antonym_1_id`); 104CREATE INDEX `antonym_of` ON `antonymy`(`antonym_1_id`,`antonym_2_id`);
105 105
106CREATE TABLE `specification` ( 106CREATE TABLE `specification` (
107 `general_id` INTEGER NOT NULL, 107 `general_id` INTEGER NOT NULL,
108 `specific_id` INTEGER NOT NULL 108 `specific_id` INTEGER NOT NULL
109); 109);
110 110
111CREATE INDEX `specification_of` ON `specification`(`general_id`); 111CREATE INDEX `specification_of` ON `specification`(`general_id`,`specific_id`);
112CREATE INDEX `generalization_of` ON `specification`(`specific_id`); 112CREATE INDEX `generalization_of` ON `specification`(`specific_id`,`general_id`);
113 113
114CREATE TABLE `pertainymy` ( 114CREATE TABLE `pertainymy` (
115 `noun_id` INTEGER NOT NULL, 115 `noun_id` INTEGER NOT NULL,
116 `pertainym_id` INTEGER NOT NULL 116 `pertainym_id` INTEGER NOT NULL
117); 117);
118 118
119CREATE INDEX `pertainym_of` ON `pertainymy`(`noun_id`); 119CREATE INDEX `pertainym_of` ON `pertainymy`(`noun_id`,`pertainym_id`);
120CREATE INDEX `anti_pertainym_of` ON `pertainymy`(`pertainym_id`); 120CREATE INDEX `anti_pertainym_of` ON `pertainymy`(`pertainym_id`,`noun_id`);
121 121
122CREATE TABLE `mannernymy` ( 122CREATE TABLE `mannernymy` (
123 `adjective_id` INTEGER NOT NULL, 123 `adjective_id` INTEGER NOT NULL,
124 `mannernym_id` INTEGER NOT NULL 124 `mannernym_id` INTEGER NOT NULL
125); 125);
126 126
127CREATE INDEX `mannernym_of` ON `mannernymy`(`adjective_id`); 127CREATE INDEX `mannernym_of` ON `mannernymy`(`adjective_id`,`mannernym_id`);
128CREATE INDEX `anti_mannernym_of` ON `mannernymy`(`mannernym_id`); 128CREATE INDEX `anti_mannernym_of` ON `mannernymy`(`mannernym_id`,`adjective_id`);
129 129
130CREATE TABLE `usage` ( 130CREATE TABLE `usage` (
131 `domain_id` INTEGER NOT NULL, 131 `domain_id` INTEGER NOT NULL,
132 `term_id` INTEGER NOT NULL 132 `term_id` INTEGER NOT NULL
133); 133);
134 134
135CREATE INDEX `usage_term_of` ON `usage`(`domain_id`); 135CREATE INDEX `usage_term_of` ON `usage`(`domain_id`,`term_id`);
136CREATE INDEX `usage_domain_of` ON `usage`(`term_id`); 136CREATE INDEX `usage_domain_of` ON `usage`(`term_id`,`domain_id`);
137 137
138CREATE TABLE `topicality` ( 138CREATE TABLE `topicality` (
139 `domain_id` INTEGER NOT NULL, 139 `domain_id` INTEGER NOT NULL,
140 `term_id` INTEGER NOT NULL 140 `term_id` INTEGER NOT NULL
141); 141);
142 142
143CREATE INDEX `topical_term_of` ON `topicality`(`domain_id`); 143CREATE INDEX `topical_term_of` ON `topicality`(`domain_id`,`term_id`);
144CREATE INDEX `topical_domain_of` ON `topicality`(`term_id`); 144CREATE INDEX `topical_domain_of` ON `topicality`(`term_id`,`domain_id`);
145 145
146CREATE TABLE `regionality` ( 146CREATE TABLE `regionality` (
147 `domain_id` INTEGER NOT NULL, 147 `domain_id` INTEGER NOT NULL,
148 `term_id` INTEGER NOT NULL 148 `term_id` INTEGER NOT NULL
149); 149);
150 150
151CREATE INDEX `regional_term_of` ON `regionality`(`domain_id`); 151CREATE INDEX `regional_term_of` ON `regionality`(`domain_id`,`term_id`);
152CREATE INDEX `regional_domain_of` ON `regionality`(`term_id`); 152CREATE INDEX `regional_domain_of` ON `regionality`(`term_id`,`domain_id`);
153 153
154CREATE TABLE `forms` ( 154CREATE TABLE `forms` (
155 `form_id` INTEGER PRIMARY KEY, 155 `form_id` INTEGER PRIMARY KEY,
@@ -166,8 +166,8 @@ CREATE TABLE `lemmas_forms` (
166 `category` SMALLINT NOT NULL 166 `category` SMALLINT NOT NULL
167); 167);
168 168
169CREATE INDEX `form_of` ON `lemmas_forms`(`lemma_id`); 169CREATE INDEX `form_of` ON `lemmas_forms`(`lemma_id`,`category`,`form_id`);
170CREATE INDEX `lemma_of` ON `lemmas_forms`(`form_id`); 170CREATE INDEX `lemma_of` ON `lemmas_forms`(`form_id`,`category`,`lemma_id`);
171 171
172CREATE TABLE `pronunciations` ( 172CREATE TABLE `pronunciations` (
173 `pronunciation_id` INTEGER PRIMARY KEY, 173 `pronunciation_id` INTEGER PRIMARY KEY,
@@ -185,8 +185,8 @@ CREATE TABLE `forms_pronunciations` (
185 `pronunciation_id` INTEGER NOT NULL 185 `pronunciation_id` INTEGER NOT NULL
186); 186);
187 187
188CREATE INDEX `pronunciation_of` ON `forms_pronunciations`(`form_id`); 188CREATE INDEX `pronunciation_of` ON `forms_pronunciations`(`form_id`,`pronunciation_id`);
189CREATE INDEX `spelling_of` ON `forms_pronunciations`(`pronunciation_id`); 189CREATE INDEX `spelling_of` ON `forms_pronunciations`(`pronunciation_id`,`form_id`);
190 190
191CREATE TABLE `frames` ( 191CREATE TABLE `frames` (
192 `frame_id` INTEGER NOT NULL, 192 `frame_id` INTEGER NOT NULL,