Answered step by step
Verified Expert Solution
Question
1 Approved Answer
( / 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started