Consider the following relations. The primary keys are underlined. All attributes are of type string if not indicated otherwise. [Hint: Use multi-step and multi-line queries to ease the formulation of queries. Use the rename operator ρ to give intermediate query results a name (some
Consider the following relations. The primary keys are underlined. All attributes are of type string if not indicated otherwise. [Hint: Use multi-step and multi-line queries to ease the formulation of queries. Use the rename operator ρ to give intermediate query results a name (some textbooks use the equivalent ‘←’ notation). Aggregate functions as you can find them defined in some textbooks are not allowed, neither in homework assignments nor in exams.]
Student(sID , name, degree: integer, dID)
Department(dID , name, address)
Lecture(lID , name, degree: integer, pID, dID)
Professor(pID , name, dID)
Register(rID , sID, lID, Semester, score: integer)
Relational Algebra Queries:
1. Find the names of students who have registered every lecture of CISE department.
2. Find the students who got the highest score in the lecture ‘DB’ in 2021 Fall semester. Show names and scores together.
3. Find the names of students in CISE department who never received a score less than 80.
4. Find the names of students who got more than 90 in the ‘DB’ lecture and less than 70 in the ‘
5. Find the names of departments whose lectures were taught by professors of other departments.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps