diff options
-rw-r--r-- | generator/schema.sql | 68 |
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 | ||
15 | CREATE INDEX `hyponym_of` ON `hypernymy`(`hypernym_id`); | 15 | CREATE INDEX `hyponym_of` ON `hypernymy`(`hypernym_id`,`hyponym_id`); |
16 | CREATE INDEX `hypernym_of` ON `hypernymy`(`hyponym_id`); | 16 | CREATE INDEX `hypernym_of` ON `hypernymy`(`hyponym_id`,`hypernym_id`); |
17 | 17 | ||
18 | CREATE TABLE `instantiation` ( | 18 | CREATE 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 | ||
23 | CREATE INDEX `instance_of` ON `instantiation`(`class_id`); | 23 | CREATE INDEX `instance_of` ON `instantiation`(`class_id`,`instance_id`); |
24 | CREATE INDEX `class_of` ON `instantiation`(`instance_id`); | 24 | CREATE INDEX `class_of` ON `instantiation`(`instance_id`,`class_id`); |
25 | 25 | ||
26 | CREATE TABLE `member_meronymy` ( | 26 | CREATE 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 | ||
31 | CREATE INDEX `member_holonym_of` ON `member_meronymy`(`meronym_id`); | 31 | CREATE INDEX `member_holonym_of` ON `member_meronymy`(`meronym_id`,`holonym_id`); |
32 | CREATE INDEX `member_meronym_of` ON `member_meronymy`(`holonym_id`); | 32 | CREATE INDEX `member_meronym_of` ON `member_meronymy`(`holonym_id`,`meronym_id`); |
33 | 33 | ||
34 | CREATE TABLE `part_meronymy` ( | 34 | CREATE 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 | ||
39 | CREATE INDEX `part_holonym_of` ON `part_meronymy`(`meronym_id`); | 39 | CREATE INDEX `part_holonym_of` ON `part_meronymy`(`meronym_id`,`holonym_id`); |
40 | CREATE INDEX `part_meronym_of` ON `part_meronymy`(`holonym_id`); | 40 | CREATE INDEX `part_meronym_of` ON `part_meronymy`(`holonym_id`,`meronym_id`); |
41 | 41 | ||
42 | CREATE TABLE `substance_meronymy` ( | 42 | CREATE 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 | ||
47 | CREATE INDEX `substance_holonym_of` ON `substance_meronymy`(`meronym_id`); | 47 | CREATE INDEX `substance_holonym_of` ON `substance_meronymy`(`meronym_id`,`holonym_id`); |
48 | CREATE INDEX `substance_meronym_of` ON `substance_meronymy`(`holonym_id`); | 48 | CREATE INDEX `substance_meronym_of` ON `substance_meronymy`(`holonym_id`,`meronym_id`); |
49 | 49 | ||
50 | CREATE TABLE `variation` ( | 50 | CREATE 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 | ||
55 | CREATE INDEX `variant_of` ON `variation`(`noun_id`); | 55 | CREATE INDEX `variant_of` ON `variation`(`noun_id`,`adjective_id`); |
56 | CREATE INDEX `attribute_of` ON `variation`(`adjective_id`); | 56 | CREATE INDEX `attribute_of` ON `variation`(`adjective_id`,`noun_id`); |
57 | 57 | ||
58 | CREATE TABLE `similarity` ( | 58 | CREATE 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 | ||
63 | CREATE INDEX `similar_to` ON `similarity`(`adjective_1_id`); | 63 | CREATE INDEX `similar_to` ON `similarity`(`adjective_1_id`,`adjective_2_id`); |
64 | 64 | ||
65 | CREATE TABLE `is_a` ( | 65 | CREATE 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 | ||
75 | CREATE INDEX `entailment_of` ON `entailment`(`given_id`); | 75 | CREATE INDEX `entailment_of` ON `entailment`(`given_id`,`entailment_id`); |
76 | CREATE INDEX `entailed_by` ON `entailment`(`entailment_id`); | 76 | CREATE INDEX `entailed_by` ON `entailment`(`entailment_id`,`given_id`); |
77 | 77 | ||
78 | CREATE TABLE `causality` ( | 78 | CREATE 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 | ||
83 | CREATE INDEX `effect_of` ON `causality`(`cause_id`); | 83 | CREATE INDEX `effect_of` ON `causality`(`cause_id`,`effect_id`); |
84 | CREATE INDEX `cause_of` ON `causality`(`effect_id`); | 84 | CREATE INDEX `cause_of` ON `causality`(`effect_id`,`cause_id`); |
85 | 85 | ||
86 | CREATE TABLE `words` ( | 86 | CREATE 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 | ||
104 | CREATE INDEX `antonym_of` ON `antonymy`(`antonym_1_id`); | 104 | CREATE INDEX `antonym_of` ON `antonymy`(`antonym_1_id`,`antonym_2_id`); |
105 | 105 | ||
106 | CREATE TABLE `specification` ( | 106 | CREATE 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 | ||
111 | CREATE INDEX `specification_of` ON `specification`(`general_id`); | 111 | CREATE INDEX `specification_of` ON `specification`(`general_id`,`specific_id`); |
112 | CREATE INDEX `generalization_of` ON `specification`(`specific_id`); | 112 | CREATE INDEX `generalization_of` ON `specification`(`specific_id`,`general_id`); |
113 | 113 | ||
114 | CREATE TABLE `pertainymy` ( | 114 | CREATE 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 | ||
119 | CREATE INDEX `pertainym_of` ON `pertainymy`(`noun_id`); | 119 | CREATE INDEX `pertainym_of` ON `pertainymy`(`noun_id`,`pertainym_id`); |
120 | CREATE INDEX `anti_pertainym_of` ON `pertainymy`(`pertainym_id`); | 120 | CREATE INDEX `anti_pertainym_of` ON `pertainymy`(`pertainym_id`,`noun_id`); |
121 | 121 | ||
122 | CREATE TABLE `mannernymy` ( | 122 | CREATE 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 | ||
127 | CREATE INDEX `mannernym_of` ON `mannernymy`(`adjective_id`); | 127 | CREATE INDEX `mannernym_of` ON `mannernymy`(`adjective_id`,`mannernym_id`); |
128 | CREATE INDEX `anti_mannernym_of` ON `mannernymy`(`mannernym_id`); | 128 | CREATE INDEX `anti_mannernym_of` ON `mannernymy`(`mannernym_id`,`adjective_id`); |
129 | 129 | ||
130 | CREATE TABLE `usage` ( | 130 | CREATE 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 | ||
135 | CREATE INDEX `usage_term_of` ON `usage`(`domain_id`); | 135 | CREATE INDEX `usage_term_of` ON `usage`(`domain_id`,`term_id`); |
136 | CREATE INDEX `usage_domain_of` ON `usage`(`term_id`); | 136 | CREATE INDEX `usage_domain_of` ON `usage`(`term_id`,`domain_id`); |
137 | 137 | ||
138 | CREATE TABLE `topicality` ( | 138 | CREATE 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 | ||
143 | CREATE INDEX `topical_term_of` ON `topicality`(`domain_id`); | 143 | CREATE INDEX `topical_term_of` ON `topicality`(`domain_id`,`term_id`); |
144 | CREATE INDEX `topical_domain_of` ON `topicality`(`term_id`); | 144 | CREATE INDEX `topical_domain_of` ON `topicality`(`term_id`,`domain_id`); |
145 | 145 | ||
146 | CREATE TABLE `regionality` ( | 146 | CREATE 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 | ||
151 | CREATE INDEX `regional_term_of` ON `regionality`(`domain_id`); | 151 | CREATE INDEX `regional_term_of` ON `regionality`(`domain_id`,`term_id`); |
152 | CREATE INDEX `regional_domain_of` ON `regionality`(`term_id`); | 152 | CREATE INDEX `regional_domain_of` ON `regionality`(`term_id`,`domain_id`); |
153 | 153 | ||
154 | CREATE TABLE `forms` ( | 154 | CREATE 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 | ||
169 | CREATE INDEX `form_of` ON `lemmas_forms`(`lemma_id`); | 169 | CREATE INDEX `form_of` ON `lemmas_forms`(`lemma_id`,`category`,`form_id`); |
170 | CREATE INDEX `lemma_of` ON `lemmas_forms`(`form_id`); | 170 | CREATE INDEX `lemma_of` ON `lemmas_forms`(`form_id`,`category`,`lemma_id`); |
171 | 171 | ||
172 | CREATE TABLE `pronunciations` ( | 172 | CREATE 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 | ||
188 | CREATE INDEX `pronunciation_of` ON `forms_pronunciations`(`form_id`); | 188 | CREATE INDEX `pronunciation_of` ON `forms_pronunciations`(`form_id`,`pronunciation_id`); |
189 | CREATE INDEX `spelling_of` ON `forms_pronunciations`(`pronunciation_id`); | 189 | CREATE INDEX `spelling_of` ON `forms_pronunciations`(`pronunciation_id`,`form_id`); |
190 | 190 | ||
191 | CREATE TABLE `frames` ( | 191 | CREATE TABLE `frames` ( |
192 | `frame_id` INTEGER NOT NULL, | 192 | `frame_id` INTEGER NOT NULL, |