about summary refs log tree commit diff stats
path: root/schema.sql
diff options
context:
space:
mode:
Diffstat (limited to 'schema.sql')
-rw-r--r--schema.sql59
1 files changed, 54 insertions, 5 deletions
diff --git a/schema.sql b/schema.sql index 62dd780..fd55734 100644 --- a/schema.sql +++ b/schema.sql
@@ -34,20 +34,25 @@ CREATE TABLE `verb_groups` (
34DROP TABLE IF EXISTS `adjectives`; 34DROP TABLE IF EXISTS `adjectives`;
35CREATE TABLE `adjectives` ( 35CREATE TABLE `adjectives` (
36 `adjective_id` INTEGER PRIMARY KEY, 36 `adjective_id` INTEGER PRIMARY KEY,
37 `form` VARCHAR(32) NOT NULL, 37 `base_form` VARCHAR(32) NOT NULL,
38 `comparative` VARCHAR(32),
39 `superlative` VARCHAR(32),
38 `position` CHAR(1) 40 `position` CHAR(1)
39); 41);
40 42
41DROP TABLE IF EXISTS `adverbs`; 43DROP TABLE IF EXISTS `adverbs`;
42CREATE TABLE `adverbs` ( 44CREATE TABLE `adverbs` (
43 `adverb_id` INTEGER PRIMARY KEY, 45 `adverb_id` INTEGER PRIMARY KEY,
44 `form` VARCHAR(32) NOT NULL 46 `base_form` VARCHAR(32) NOT NULL,
47 `comparative` VARCHAR(32),
48 `superlative` VARCHAR(32)
45); 49);
46 50
47DROP TABLE IF EXISTS `nouns`; 51DROP TABLE IF EXISTS `nouns`;
48CREATE TABLE `nouns` ( 52CREATE TABLE `nouns` (
49 `noun_id` INTEGER PRIMARY KEY, 53 `noun_id` INTEGER PRIMARY KEY,
50 `form` VARCHAR(32) NOT NULL 54 `singular` VARCHAR(32) NOT NULL,
55 `plural` VARCHAR(32)
51); 56);
52 57
53DROP TABLE IF EXISTS `hypernymy`; 58DROP TABLE IF EXISTS `hypernymy`;
@@ -146,10 +151,54 @@ CREATE TABLE `mannernymy` (
146 FOREIGN KEY (`mannernym_id`) REFERENCES `adverbs`(`adverb_id`) 151 FOREIGN KEY (`mannernym_id`) REFERENCES `adverbs`(`adverb_id`)
147); 152);
148 153
149DROP TABLE IF EXISTS `synonymy`; 154DROP TABLE IF EXISTS `noun_synonymy`;
150CREATE TABLE `synonymy` ( 155CREATE TABLE `noun_synonymy` (
156 `noun_1_id` INTEGER NOT NULL,
157 `noun_2_id` INTEGER NOT NULL,
158 FOREIGN KEY (`noun_1_id`) REFERENCES `nouns`(`nouns_id`),
159 FOREIGN KEY (`noun_2_id`) REFERENCES `nouns`(`nouns_id`)
160);
161
162DROP TABLE IF EXISTS `adjective_synonymy`;
163CREATE TABLE `adjective_synonymy` (
151 `adjective_1_id` INTEGER NOT NULL, 164 `adjective_1_id` INTEGER NOT NULL,
152 `adjective_2_id` INTEGER NOT NULL, 165 `adjective_2_id` INTEGER NOT NULL,
153 FOREIGN KEY (`adjective_1_id`) REFERENCES `adjectives`(`adjective_id`), 166 FOREIGN KEY (`adjective_1_id`) REFERENCES `adjectives`(`adjective_id`),
154 FOREIGN KEY (`adjective_2_id`) REFERENCES `adjectives`(`adjective_id`) 167 FOREIGN KEY (`adjective_2_id`) REFERENCES `adjectives`(`adjective_id`)
155); 168);
169
170DROP TABLE IF EXISTS `adverb_synonymy`;
171CREATE TABLE `adverb_synonymy` (
172 `adverb_1_id` INTEGER NOT NULL,
173 `adverb_2_id` INTEGER NOT NULL,
174 FOREIGN KEY (`adverb_1_id`) REFERENCES `adverbs`(`adverb_id`),
175 FOREIGN KEY (`adverb_2_id`) REFERENCES `adverbs`(`adverb_id`)
176);
177
178DROP TABLE IF EXISTS `noun_pronunciations`;
179CREATE TABLE `noun_pronunciations` (
180 `noun_id` INTEGER NOT NULL,
181 `pronunciation` VARCHAR(64) NOT NULL,
182 FOREIGN KEY (`noun_id`) REFERENCES `nouns`(`noun_id`)
183);
184
185DROP TABLE IF EXISTS `verb_pronunciations`;
186CREATE TABLE `verb_pronunciations` (
187 `verb_id` INTEGER NOT NULL,
188 `pronunciation` VARCHAR(64) NOT NULL,
189 FOREIGN KEY (`verb_id`) REFERENCES `verbs`(`verb_id`)
190);
191
192DROP TABLE IF EXISTS `adjective_pronunciations`;
193CREATE TABLE `adjective_pronunciations` (
194 `adjective_id` INTEGER NOT NULL,
195 `pronunciation` VARCHAR(64) NOT NULL,
196 FOREIGN KEY (`adjective_id`) REFERENCES `adjectives`(`adjective_id`)
197);
198
199DROP TABLE IF EXISTS `adverb_pronunciations`;
200CREATE TABLE `adverb_pronunciations` (
201 `adverb_id` INTEGER NOT NULL,
202 `pronunciation` VARCHAR(64) NOT NULL,
203 FOREIGN KEY (`adverb_id`) REFERENCES `adverbs`(`adverb_id`)
204);