Design a relational database to keep track of student’s class schedule. Student
ID: 3662952 • Letter: D
Question
Design a relational database to keep track of student’s class schedule.
Student
Class 1
Class Time1
Class 2
Class Time2
Class 3
Class Time3
John Smith
Math151
10:30am
BUS 101
11:30am
ECON 201
12:30pm
Norman Park
ECON 201
12:30pm
DA 310
9:00pm
Jennie Lee
Math 151
10:30am
ECON 201
12:30pm
DA 310
9:00pm
Charlie Brown
Math 152
9:30am
BUS 101
11:30am
DA 320
8:00pm
John Smith
DA 320
8:00pm
Student
Class 1
Class Time1
Class 2
Class Time2
Class 3
Class Time3
John Smith
Math151
10:30am
BUS 101
11:30am
ECON 201
12:30pm
Norman Park
ECON 201
12:30pm
DA 310
9:00pm
Jennie Lee
Math 151
10:30am
ECON 201
12:30pm
DA 310
9:00pm
Charlie Brown
Math 152
9:30am
BUS 101
11:30am
DA 320
8:00pm
John Smith
DA 320
8:00pm
Explanation / Answer
CREATE TABLE Schedule(
student_id INT NOT NULL;
student_name VARCHAR(100) NOT NULL;
course VARCHAR(100) NOT NULL;
time DATE;
);
Each Student have unique ID;
// FIll the value like in 1st
INSERT INTO Schedule(student_id, student_name, course, time) VALUES (1. "John Smith", "Math151", MAKETIME(10,30,00));
INSERT INTO Schedule(student_id, student_name, course, time) VALUES ();
INSERT INTO Schedule(student_id, student_name, course, time) VALUES ();
INSERT INTO Schedule(student_id, student_name, course, time) VALUES ();
INSERT INTO Schedule(student_id, student_name, course, time) VALUES ();
INSERT INTO Schedule(student_id, student_name, course, time) VALUES ();
INSERT INTO Schedule(student_id, student_name, course, time) VALUES ();
INSERT INTO Schedule(student_id, student_name, course, time) VALUES ();
INSERT INTO Schedule(student_id, student_name, course, time) VALUES ();
INSERT INTO Schedule(student_id, student_name, course, time) VALUES ();
INSERT INTO Schedule(student_id, student_name, course, time) VALUES ();
INSERT INTO Schedule(student_id, student_name, course, time) VALUES ();
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.