-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdict-revised.schema
More file actions
53 lines (45 loc) · 1.39 KB
/
dict-revised.schema
File metadata and controls
53 lines (45 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
CREATE TABLE "dicts" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"name" varchar(255),
"type" integer);
INSERT INTO "dicts" (id, name, type) VALUES(1,'教育部國語辭典',1);
CREATE TABLE "entries" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"title" varchar(255),
"radical" varchar(255),
"stroke_count" integer,
"non_radical_stroke_count" integer,
"dict_id" integer
);
CREATE TABLE "heteronyms" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"entry_id" integer,
"idx" integer,
"bopomofo" varchar(255),
"bopomofo2" varchar(255),
"pinyin" varchar(255)
);
CREATE TABLE "definitions" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"heteronym_id" integer,
"idx" integer,
"type" varchar(255),
"def" text,
"example" text,
"quote" text,
"synonyms" varchar(255),
"antonyms" varchar(255),
"link" text,
"source" varchar(255)
);
CREATE TABLE "translations" (
"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
"entry_id" integer,
"idx" integer,
"lang" varchar(255),
"def" text
);
CREATE INDEX "index_entries_on_dict_id" ON "entries" ("dict_id");
CREATE INDEX "index_heteronyms_on_entry_id" ON "heteronyms" ("entry_id");
CREATE INDEX "index_definations_on_heteronym_id" ON "definitions" ("heteronym_id");
CREATE INDEX "index_translations_on_entry_id" ON "translations" ("entry_id");