-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathquery1.sql
More file actions
45 lines (37 loc) · 977 Bytes
/
query1.sql
File metadata and controls
45 lines (37 loc) · 977 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
37
38
39
40
41
42
43
44
45
create database student;
use student;
create table student_signups(
student_id INT(11) AUTO_INCREMENT PRIMARY KEY,
student_name VARCHAR(50),
student_age INT(11)
);
create table course(
course_id INT AUTO_INCREMENT PRIMARY KEY,
course_name VARCHAR(50),
enroll_id INT(11),
FOREIGN KEY(enroll_id)
REFERENCES enrollment (enrollment_id)
ON DELETE cascade
ON UPDATE cascade
);
create table coursetype(
coursetype_id INT AUTO_INCREMENT PRIMARY KEY,
course_type VARCHAR(50),
enroll_id INT(11),
FOREIGN KEY(enroll_id)
REFERENCES enrollment (enrollment_id)
ON DELETE cascade
ON UPDATE cascade
);
create table enrollement(
enrollment_id INT(11) AUTO_INCREMENT PRIMARY KEY,
semester_name VARCHAR(50)
);
create table specialized(
specialized_id INT(11) AUTO_INCREMENT PRIMARY KEY,
person_name VARCHAR(50)
);
create table status(
status_id INT(11) AUTO_INCREMENT PRIMARY KEY,
person_name VARCHAR(50)
);