-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase_structure.txt
More file actions
executable file
·37 lines (33 loc) · 1.53 KB
/
database_structure.txt
File metadata and controls
executable file
·37 lines (33 loc) · 1.53 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
Database
Tables:
users, stores active users.
-varchar(255) firstname, varchar(255) lastname, varchar(255) email, varchar(255) password, varchar(255) confcode,
varchar(255) file, int rating
password is the hash of the user's password
unactivated_users, stores users who have not confirmed their emails yet
-int(unsigned) id, varchar(255) firstname, varchar(255) lastname, varchar(255) email, varchar(255) password,
datetime registration_date
harvardcourses, stores all harvard courses for which a forum has been created
-int(unsigned) id, varchar(255) name, varchar(255) department
postsin[id], where id is the unique id of a course.
-int(unsigned) post_id, int(unsigned) poster_id, varchar(255) poster_firstname, varchar(255) poster_lastname, varchar(255) post title,
varchar(255) post_tags, varchar(511) keywords, int post_rating, varchar(255) file, varchar(511) privacy setting, datetime posttime.
Privacy setting: a csv of integers
first component: 0 if completely public, 1 if the post is anonymous, ,
3 if visible to a list of following people, 4 if anonymous to everyone but a list of following people
second, third, ... component: a csv of user id's who have special permissions.
tagsin[id], where id is the unique id of a course.
-int(unsigned) tag_id, varchar(255) tag_type, varchar(255) tag_name
where tag_type is either:
-pset
-lecture
-section
-exam
-midterm
-final
-project
Files
User files should be stored in
users/userfile
post files should be stored in
posts/courseid/tagid