Question: ( / 8 marks ) Write the following queries in relational algebra, using the university schema ( see appendix A . 1 and A .
marks Write the following queries in relational algebra, using the university schema see appendix A and A in your textbook for the University schema and instance respectively Hint: see Lesson presentation, slide "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 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 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 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 perdepartment maximum salary computed by the preceding query marks Hint: figure out how to calculate out the maximum salaries for each department first.Figure A The department relation.
Figure A Schema diagram for the university database.
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
