-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.sql
More file actions
executable file
·67 lines (58 loc) · 1.23 KB
/
schema.sql
File metadata and controls
executable file
·67 lines (58 loc) · 1.23 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
/*
drop table if exists users;
create table users(
user_id bigint primary key,
user_firstname TEXT,
user_lastname TEXT,
user_gender TEXT,
user_status INTEGER
);
drop table if exists scores;
create table scores(
id INTEGER primary key AUTO_INCREMENT,
user_id bigint,
qid INTEGER,
answer TEXT,
score INTEGER,
r_time TEXT
);
drop table if exists questions;
create table questions(
id INTEGER primary key AUTO_INCREMENT,
user_id bigint,
qid INTEGER,
subject TEXT,
r_time TEXT
);
*/
-- The following three tables are currently being used. The rest tables are deprecated.
drop table if exists user;
create table user(
user_id bigint primary key,
user_firstname TEXT,
user_lastname TEXT,
reg_time TEXT,
current_subject TEXT
);
drop table if exists conversation;
create table conversation(
uid INTEGER primary key AUTO_INCREMENT,
sender bigint,
recipient bigint,
time_stamp TEXT,
type TEXT,
dialogue TEXT
);
-- user study history
-- used to store qids, scores, and timestamps
-- and pass to question sequencing models
drop table if exists user_history;
create table user_history(
user_id bigint,
qid INTEGER,
subject TEXT,
score INTEGER,
type TEXT,
begin_uid INTEGER primary key,
end_uid INTEGER
);