forked from yaejinpark/disaster-tweets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.sql
80 lines (66 loc) · 1.74 KB
/
schema.sql
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
-- Exported from QuickDBD: https://www.quickdatabasediagrams.com/
-- NOTE! If you have used non-SQL datatypes in your design, you will have to change these here.
CREATE TABLE "test" (
"id" int NOT NULL,
"keyword" varchar NULL,
"location" varchar NULL,
"text" varchar NOT NULL,
CONSTRAINT "pk_test" PRIMARY KEY (
"id"
)
);
CREATE TABLE "train" (
"id" int, NOT NULL,
"keyword" varchar NULL,
"location" varchar NULL,
"text" varchar NOT NULL,
"target" int NOT NULL,
CONSTRAINT "pk_train" PRIMARY KEY (
"id"
)
);
CREATE TABLE "base_NLP" (
"id" int NOT NULL,
"result" int NOT NULL,
CONSTRAINT "pk_base_NLP" PRIMARY KEY (
"id"
)
);
CREATE TABLE "NLP1" (
"id" int NOT NULL,
"result" int NOT NULL,
CONSTRAINT "pk_NLP1" PRIMARY KEY (
"id"
)
);
CREATE TABLE "NLP2" (
"id" int NOT NULL,
"result" int NOT NULL,
CONSTRAINT "pk_NLP2" PRIMARY KEY (
"id"
)
);
CREATE TABLE "NLP3" (
"id" int NOT NULL,
"result" int NOT NULL,
CONSTRAINT "pk_NLP3" PRIMARY KEY (
"id"
)
);
CREATE TABLE "NLP4" (
"id" int NOT NULL,
"result" int NOT NULL,
CONSTRAINT "pk_NLP4" PRIMARY KEY (
"id"
)
);
ALTER TABLE "base_NLP" ADD CONSTRAINT "fk_base_NLP_id" FOREIGN KEY("id")
REFERENCES "train" ("id");
ALTER TABLE "NLP1" ADD CONSTRAINT "fk_NLP1_id" FOREIGN KEY("id")
REFERENCES "train" ("id");
ALTER TABLE "NLP2" ADD CONSTRAINT "fk_NLP2_id" FOREIGN KEY("id")
REFERENCES "train" ("id");
ALTER TABLE "NLP3" ADD CONSTRAINT "fk_NLP3_id" FOREIGN KEY("id")
REFERENCES "train" ("id");
ALTER TABLE "NLP4" ADD CONSTRAINT "fk_NLP4_id" FOREIGN KEY("id")
REFERENCES "train" ("id");