-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcreateTables.sql
More file actions
100 lines (89 loc) · 2.67 KB
/
Copy pathcreateTables.sql
File metadata and controls
100 lines (89 loc) · 2.67 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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
-- auto-generated definition
create table answer
(
id varchar(20) not null
primary key,
last_active_date datetime null,
down_vote int null,
up_vote int null,
content text null,
tokenization text null,
score int null,
title text null,
is_accepted tinyint(1) null,
question_id varchar(20) null,
owner_id varchar(20) null
);
-- auto-generated definition
create table answer_tag_relation
(
answer_id varchar(20) not null,
tag_id int not null
);
create index answer_tag_relation_answer_id_fk
on answer_tag_relation (answer_id);
create index answer_tag_relation_tag_id_fk
on answer_tag_relation (tag_id);
-- auto-generated definition
create table comment
(
id varchar(20) not null
primary key,
owner_id varchar(20) null,
content text null,
tokenization text null,
score int null,
creation_date datetime null,
post_id varchar(20) null
);
-- auto-generated definition
create table owner
(
id varchar(20) not null
primary key,
name text null,
reputation int null
);
-- auto-generated definition
create table question
(
id varchar(20) not null
primary key,
owner_id varchar(20) null,
view_count int null,
favorite_count int null,
up_vote int null,
down_vote int null,
closed_date datetime null,
score int null,
last_active_date datetime null,
creation_date datetime null,
title text null,
content text null,
tokenization text null
);
-- auto-generated definition
create table question_tag_relation
(
question_id varchar(20) null,
tag_id int null
);
create index question_tag_relation_question_id_fk
on question_tag_relation (question_id);
create index question_tag_relation_tag_id_fk
on question_tag_relation (tag_id);
-- auto-generated definition
create table tag
(
id int auto_increment
primary key,
tag_name varchar(100) null,
thread_number int null,
thread_number_2023 int null,
average_view_count int null,
average_vote_count int null,
discussion_people_number int null,
comprehensive_score int null,
constraint tag_pk
unique (tag_name)
);