Question: 1 . Create a new database called lab 0 1 2 . In database lab 0 1 , create 4 tables: course, advisor, student, and
Create a new database called lab
In database lab create tables: course, advisor, student, and department
course courseid varchar title varchar deptname varchar credits numeric primary key courseid
foreign key deptname references department deptname
advisor sID varchar iID varchar primary key sID foreign key sID references student ID
student ID varchar name varchar not null, deptname varchar totcred numeric primary key ID
foreign key deptname references department deptname
department deptname varchar building varchar budget numeric primary key deptname
Populate tables
Populate the table "student" with the data below:
'Chavez', 'Finance', ;
'Peltier', 'Physics', ;
'Levy', 'Physics', ;
Populate the table "course" with the data below:
FIN 'Investment Banking', 'Finance', ;
HIS 'World History', 'History', ;
MU 'Music Video Production', 'Music', ;
Populate the table "department" with the data below:
Finance 'Painter', ;
History 'Painter', ;
Music 'Packard', ;
Physics 'Watson', ;
Please run the sql statements below:
select from student where deptname 'physics'
select from course where deptname 'Finance'
Note: Please submit your sql statement returning results. A word document with screenshots on the sql returning results will be good to submit.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
