Answered step by step
Verified Expert Solution
Question
1 Approved Answer
studentsid course cid prerequisite cid pre-cid record sidcid glr year grade In addition, suppose we are given the relation qtrgpa sid qr year that provides
studentsid course cid prerequisite cid pre-cid record sidcid glr year grade In addition, suppose we are given the relation qtrgpa sid qr year that provides the gpa of cach student in quarters they were enrolled. Consider the following queries: 1. List the students who have taken all prerequisites for CSE132X with a grade of 2 or higher (this refers to direct prerequisites only, not to prerequisites of prerequisites). The answer should have one attribute sid. Note that, if CSE132X has no prerequisites, then all students should be in the answer. 2. Using relation qirgpa, find the students whose GPA in cach quarter they were enrolled is at least as high as their GPA in the previous quarters they were enrolled. Students who have never been enrolled, or have been enrolled for only one quarter, should be included in the answer. Recall that students may have gaps in enrollment. For queries (1) and (2) do the following: (i) write the query in relational calculus using (at least one) universal quantification V (ii) rewrite the query in (i) in using only existential quantification (iii) write the SQL query corresponding directly to the relational calculus query in (ii), that uses only NOT EXISTS tests on nested queries
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