Question: Problem 2. (20 points) Consider the relational database defined in Express in relational algebra each of the following queries: create table professor ( professor_ID varchar

Problem 2. (20 points) Consider the relational database defined in Express in relational algebra each of the following queries: create table professor ( professor_ID varchar ( 1 0 ) , professor_name varchar ( 3 0 ) , ZIP_code char ( 5 ) , salary numeric (10 , 2 ) , primary key ( professor_ID ) ) ;

create table student ( student_ID varchar ( 1 0 ) , student_name varchar ( 3 0 ) , ZIP_code char ( 5 ) , primary key ( student_ID ) ) ;

create table advisement ( professor_ID varchar ( 1 0 ) , student_ID varchar ( 1 0 ) , start_date date , primary key ( professor_ID , student_ID ) , foreign key ( professor_ID ) references professor , foreign key ( student_ID ) references student ) ;

(a) (10 points) Find every ZIP code with more than 100 students (for each of these ZIP codes, there must be more than 100 students having that ZIP code).

(b) (10 points) Find the ID of each student advised by SOME of the professors who advise student S001 (i.e., student whose ID is S001).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!