-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommand.txt
More file actions
36 lines (28 loc) · 749 Bytes
/
command.txt
File metadata and controls
36 lines (28 loc) · 749 Bytes
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
CREATE TABLE course(
id int AUTO_INCREMENT primary KEY,
name varchar(200),
coursecode varchar(200),
subcourse int,
FOREIGN KEY(subcourse) REFERENCES course(id)
)
CREATE TABLE courseDetails(
id int PRIMARY KEY AUTO_INCREMENT,
fullname varchar(300),
details varchar(5000),
coursecode varchar(200) UNIQUE KEY
)
create TABLE comments(
id int AUTO_INCREMENT PRIMARY key,
comment varchar(5000),
username varchar(200),
questionid int,
reply int,
FOREIGN KEY(questionid) REFERENCES questions(id))
CREATE TABLE likes(
id int AUTO_INCREMENT PRIMARY KEY,
commentid int,
questionsid int,
dates datetime,
FOREIGN KEY(commentid) REFERENCES comments(id),
FOREIGN KEY(questionsid) REFERENCES questions(id)
)