In database lab01, create 4 tables: course, advisor, student, and department (Note: The order of tables below is not proper for creating tables. Please think about which table should be created first) course (course_id varchar(8), title varchar(50), dept_name varchar(20), credits numeric(2,0), primary key (course_id), foreign key (dept_name) references department (dept_name)) advisor (s_ID varchar(5), i_ID varchar(5), primary key (s_ID), foreign key (s_ID) references student (ID)) student (ID varchar(5), name varchar(20) not null, dept_name varchar(20), tot_cred numeric(3,0), primary key (ID), foreign key (dept_name) references department (dept_name)) department (dept_name varchar(20), building varchar(15), budget numeric(12,2), primary key (dept_name)) . Populate tables (Note: The order of populating table below is not proper. Please think about which table should be populated first) Populate the table "student" with the data below: ('23121', 'Chavez', 'Finance', '110'); ('44553', 'Peltier', 'Physics', '56'); ('45678', 'Levy', 'Physics', '46'); Populate the table "course" with the data below: ('FIN-201', 'Investment Banking', 'Finance', '3'); ('HIS-351', 'World History', 'History', '3'); ('MU-199', 'Music Video Production', 'Music', '3'); Populate the table "department" with the data below: ('Finance', 'Painter', '120000'); ('History', 'Painter', '50000'); ('Music', 'Packard', '80000'); ('Physics', 'Watson', '70000'); . Please run the sql statements below: select * from student where dept_name = 'physics' select * from course where dept_name = 'Finance'

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

Help with SQL database 

2. In database lab01, create 4 tables: course, advisor, student, and department (Note: The order of tables below is not proper for creating tables. Please think about which table should be created first)

course (course_id varchar(8), title varchar(50), dept_name varchar(20), credits numeric(2,0), primary key (course_id), foreign key (dept_name) references department (dept_name))

advisor (s_ID varchar(5), i_ID varchar(5), primary key (s_ID), foreign key (s_ID) references student (ID))

student (ID varchar(5), name varchar(20) not null, dept_name varchar(20), tot_cred numeric(3,0), primary key (ID), foreign key (dept_name) references department (dept_name))

department (dept_name varchar(20), building varchar(15), budget numeric(12,2), primary key (dept_name))

. Populate tables (Note: The order of populating table below is not proper. Please think about which table should be populated first)

Populate the table "student" with the data below: ('23121', 'Chavez', 'Finance', '110'); ('44553', 'Peltier', 'Physics', '56'); ('45678', 'Levy', 'Physics', '46');

Populate the table "course" with the data below:

('FIN-201', 'Investment Banking', 'Finance', '3'); ('HIS-351', 'World History', 'History', '3'); ('MU-199', 'Music Video Production', 'Music', '3');

Populate the table "department" with the data below:

('Finance', 'Painter', '120000'); ('History', 'Painter', '50000'); ('Music', 'Packard', '80000'); ('Physics', 'Watson', '70000');

. Please run the sql statements below:

select * from student where dept_name = 'physics'

select * from course where dept_name = 'Finance'

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 10 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY