diff options
Diffstat (limited to 'schema.sql')
-rw-r--r-- | schema.sql | 121 |
1 files changed, 119 insertions, 2 deletions
diff --git a/schema.sql b/schema.sql index 7c1b52c..62dd780 100644 --- a/schema.sql +++ b/schema.sql | |||
@@ -34,5 +34,122 @@ CREATE TABLE `verb_groups` ( | |||
34 | DROP TABLE IF EXISTS `adjectives`; | 34 | DROP TABLE IF EXISTS `adjectives`; |
35 | CREATE TABLE `adjectives` ( | 35 | CREATE TABLE `adjectives` ( |
36 | `adjective_id` INTEGER PRIMARY KEY, | 36 | `adjective_id` INTEGER PRIMARY KEY, |
37 | `adjective` VARCHAR(32) NOT NULL | 37 | `form` VARCHAR(32) NOT NULL, |
38 | ); \ No newline at end of file | 38 | `position` CHAR(1) |
39 | ); | ||
40 | |||
41 | DROP TABLE IF EXISTS `adverbs`; | ||
42 | CREATE TABLE `adverbs` ( | ||
43 | `adverb_id` INTEGER PRIMARY KEY, | ||
44 | `form` VARCHAR(32) NOT NULL | ||
45 | ); | ||
46 | |||
47 | DROP TABLE IF EXISTS `nouns`; | ||
48 | CREATE TABLE `nouns` ( | ||
49 | `noun_id` INTEGER PRIMARY KEY, | ||
50 | `form` VARCHAR(32) NOT NULL | ||
51 | ); | ||
52 | |||
53 | DROP TABLE IF EXISTS `hypernymy`; | ||
54 | CREATE TABLE `hypernymy` ( | ||
55 | `hypernym_id` INTEGER NOT NULL, | ||
56 | `hyponym_id` INTEGER NOT NULL, | ||
57 | FOREIGN KEY (`hypernym_id`) REFERENCES `nouns`(`noun_id`), | ||
58 | FOREIGN KEY (`hyponym_id`) REFERENCES `nouns`(`noun_id`) | ||
59 | ); | ||
60 | |||
61 | DROP TABLE IF EXISTS `instantiation`; | ||
62 | CREATE TABLE `instantiation` ( | ||
63 | `class_id` INTEGER NOT NULL, | ||
64 | `instance_id` INTEGER NOT NULL, | ||
65 | FOREIGN KEY (`class_id`) REFERENCES `nouns`(`noun_id`), | ||
66 | FOREIGN KEY (`instance_id`) REFERENCES `nouns`(`noun_id`) | ||
67 | ); | ||
68 | |||
69 | DROP TABLE IF EXISTS `member_meronymy`; | ||
70 | CREATE TABLE `member_meronymy` ( | ||
71 | `meronym_id` INTEGER NOT NULL, | ||
72 | `holonym_id` INTEGER NOT NULL, | ||
73 | FOREIGN KEY (`meronym_id`) REFERENCES `nouns`(`noun_id`), | ||
74 | FOREIGN KEY (`holonym_id`) REFERENCES `nouns`(`noun_id`) | ||
75 | ); | ||
76 | |||
77 | DROP TABLE IF EXISTS `part_meronymy`; | ||
78 | CREATE TABLE `part_meronymy` ( | ||
79 | `meronym_id` INTEGER NOT NULL, | ||
80 | `holonym_id` INTEGER NOT NULL, | ||
81 | FOREIGN KEY (`meronym_id`) REFERENCES `nouns`(`noun_id`), | ||
82 | FOREIGN KEY (`holonym_id`) REFERENCES `nouns`(`noun_id`) | ||
83 | ); | ||
84 | |||
85 | DROP TABLE IF EXISTS `substance_meronymy`; | ||
86 | CREATE TABLE `substance_meronymy` ( | ||
87 | `meronym_id` INTEGER NOT NULL, | ||
88 | `holonym_id` INTEGER NOT NULL, | ||
89 | FOREIGN KEY (`meronym_id`) REFERENCES `nouns`(`noun_id`), | ||
90 | FOREIGN KEY (`holonym_id`) REFERENCES `nouns`(`noun_id`) | ||
91 | ); | ||
92 | |||
93 | DROP TABLE IF EXISTS `variation`; | ||
94 | CREATE TABLE `variation` ( | ||
95 | `noun_id` INTEGER NOT NULL, | ||
96 | `adjective_id` INTEGER NOT NULL, | ||
97 | FOREIGN KEY (`noun_id`) REFERENCES `nouns`(`noun_id`), | ||
98 | FOREIGN KEY (`adjective_id`) REFERENCES `adjectives`(`adjective_id`) | ||
99 | ); | ||
100 | |||
101 | DROP TABLE IF EXISTS `noun_antonymy`; | ||
102 | CREATE TABLE `noun_antonymy` ( | ||
103 | `noun_1_id` INTEGER NOT NULL, | ||
104 | `noun_2_id` INTEGER NOT NULL, | ||
105 | FOREIGN KEY (`noun_1_id`) REFERENCES `nouns`(`noun_id`), | ||
106 | FOREIGN KEY (`noun_2_id`) REFERENCES `nouns`(`noun_id`) | ||
107 | ); | ||
108 | |||
109 | DROP TABLE IF EXISTS `adjective_antonymy`; | ||
110 | CREATE TABLE `adjective_antonymy` ( | ||
111 | `adjective_1_id` INTEGER NOT NULL, | ||
112 | `adjective_2_id` INTEGER NOT NULL, | ||
113 | FOREIGN KEY (`adjective_1_id`) REFERENCES `adjectives`(`adjective_id`), | ||
114 | FOREIGN KEY (`adjective_2_id`) REFERENCES `adjectives`(`adjective_id`) | ||
115 | ); | ||
116 | |||
117 | DROP TABLE IF EXISTS `adverb_antonymy`; | ||
118 | CREATE TABLE `adverb_antonymy` ( | ||
119 | `adverb_1_id` INTEGER NOT NULL, | ||
120 | `adverb_2_id` INTEGER NOT NULL, | ||
121 | FOREIGN KEY (`adverb_1_id`) REFERENCES `adverbs`(`adverb_id`), | ||
122 | FOREIGN KEY (`adverb_2_id`) REFERENCES `adverbs`(`adverb_id`) | ||
123 | ); | ||
124 | |||
125 | DROP TABLE IF EXISTS `specification`; | ||
126 | CREATE TABLE `specification` ( | ||
127 | `general_id` INTEGER NOT NULL, | ||
128 | `specific_id` INTEGER NOT NULL, | ||
129 | FOREIGN KEY (`general_id`) REFERENCES `adjectives`(`adjective_id`), | ||
130 | FOREIGN KEY (`specific_id`) REFERENCES `adjectives`(`adjective_id`) | ||
131 | ); | ||
132 | |||
133 | DROP TABLE IF EXISTS `pertainymy`; | ||
134 | CREATE TABLE `pertainymy` ( | ||
135 | `noun_id` INTEGER NOT NULL, | ||
136 | `pertainym_id` INTEGER NOT NULL, | ||
137 | FOREIGN KEY (`noun_id`) REFERENCES `nouns`(`noun_id`), | ||
138 | FOREIGN KEY (`pertainym_id`) REFERENCES `adjectives`(`adjective_id`) | ||
139 | ); | ||
140 | |||
141 | DROP TABLE IF EXISTS `mannernymy`; | ||
142 | CREATE TABLE `mannernymy` ( | ||
143 | `adjective_id` INTEGER NOT NULL, | ||
144 | `mannernym_id` INTEGER NOT NULL, | ||
145 | FOREIGN KEY (`adjective_id`) REFERENCES `adjectives`(`adjective_id`), | ||
146 | FOREIGN KEY (`mannernym_id`) REFERENCES `adverbs`(`adverb_id`) | ||
147 | ); | ||
148 | |||
149 | DROP TABLE IF EXISTS `synonymy`; | ||
150 | CREATE TABLE `synonymy` ( | ||
151 | `adjective_1_id` INTEGER NOT NULL, | ||
152 | `adjective_2_id` INTEGER NOT NULL, | ||
153 | FOREIGN KEY (`adjective_1_id`) REFERENCES `adjectives`(`adjective_id`), | ||
154 | FOREIGN KEY (`adjective_2_id`) REFERENCES `adjectives`(`adjective_id`) | ||
155 | ); | ||