diff options
Diffstat (limited to 'schema.sql')
-rw-r--r-- | schema.sql | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/schema.sql b/schema.sql new file mode 100644 index 0000000..7c1b52c --- /dev/null +++ b/schema.sql | |||
@@ -0,0 +1,38 @@ | |||
1 | DROP TABLE IF EXISTS `verbs`; | ||
2 | CREATE TABLE `verbs` ( | ||
3 | `verb_id` INTEGER PRIMARY KEY, | ||
4 | `infinitive` VARCHAR(32) NOT NULL, | ||
5 | `past_tense` VARCHAR(32) NOT NULL, | ||
6 | `past_participle` VARCHAR(32) NOT NULL, | ||
7 | `ing_form` VARCHAR(32) NOT NULL, | ||
8 | `s_form` VARCHAR(32) NOT NULL | ||
9 | ); | ||
10 | |||
11 | DROP TABLE IF EXISTS `groups`; | ||
12 | CREATE TABLE `groups` ( | ||
13 | `group_id` INTEGER PRIMARY KEY, | ||
14 | `parent_id` INTEGER, | ||
15 | FOREIGN KEY (`parent_id`) REFERENCES `groups`(`group_id`) | ||
16 | ); | ||
17 | |||
18 | DROP TABLE IF EXISTS `frames`; | ||
19 | CREATE TABLE `frames` ( | ||
20 | `frame_id` INTEGER PRIMARY KEY, | ||
21 | `group_id` INTEGER NOT NULL, | ||
22 | `data` BLOB NOT NULL, | ||
23 | FOREIGN KEY (`group_id`) REFERENCES `groups`(`group_id`) | ||
24 | ); | ||
25 | |||
26 | DROP TABLE IF EXISTS `verb_groups`; | ||
27 | CREATE TABLE `verb_groups` ( | ||
28 | `verb_id` INTEGER NOT NULL, | ||
29 | `group_id` INTEGER NOT NULL, | ||
30 | FOREIGN KEY (`verb_id`) REFERENCES `verbs`(`verb_id`), | ||
31 | FOREIGN KEY (`group_id`) REFERENCES `groups`(`group_id`) | ||
32 | ); | ||
33 | |||
34 | DROP TABLE IF EXISTS `adjectives`; | ||
35 | CREATE TABLE `adjectives` ( | ||
36 | `adjective_id` INTEGER PRIMARY KEY, | ||
37 | `adjective` VARCHAR(32) NOT NULL | ||
38 | ); \ No newline at end of file | ||