Answered step by step
Verified Expert Solution
Question
1 Approved Answer
4. (15 points) Relational Algebra and Queries. Consider the following relational schema (keys are underlined): Students (sid: integer, sname: string, major string) Takes (sid: string,
4. (15 points) Relational Algebra and Queries. Consider the following relational schema (keys are underlined): Students (sid: integer, sname: string, major string) Takes (sid: string, cid: string, grade: string) Courses (cid: string, title: string) (a) Write the following query in relational algebra: Find the names of the students who major in Math or CS, where `Math' and 'CS' are the values of the attribute major in the Students relation. (b) Write the following query in relational algebra: Find the names of the students who are enrolled in CSC411 but not in CSC414, where 'CSC411' and 'CSC414' are the values of the attribute title in the Courses relation. () Write the following query in relational algebra: Find the names of the students who are enrolled in both 'CSC411' and 'CSC414, where 'CSC411' and 'CSC414' are the values of the attribute title in the Courses relation
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