Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( / 8 marks ) Write the following queries in relational algebra, using the university schema ( see appendix A . 1 and A .

(/8 marks) Write the following queries in relational algebra, using the university schema (see appendix A.1 and A.3 in your textbook for the University schema and instance respectively). Hint: see Lesson 02 presentation, slide 45 "Approach to writing relational algebra queries", for approach on writing relational algebra queries and make sure if you have multiple tables that you compute the joins correctly (watch out for name collisions if using natural join).
a. Find the names of all students who have taken at least one Comp. Sci. course (2 marks). Hint: Start by figuring out to list all the courses taught by the computer science department.
b. Find the IDs and names of all students who have not taken any course offering before Spring 2017(2 marks). Hint: assume that spring is the first semester of the year when writing your comparison expression
c. For each department, find the maximum salary of instructors in that department. You may assume that every department has at least one instructor (2 marks). Hint: be careful to use the correct syntax for aggregate functions, as per the lecture slides.
d. Find the lowest, across all departments, of the per-department maximum salary computed by the preceding query (2 marks). Hint: figure out how to calculate out the maximum salaries for each department first.Figure A.3 The department relation.
Figure A.1 Schema diagram for the university database.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

1. Which is the most abundant gas presented in the atmosphere?

Answered: 1 week ago