Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following table definition, where the primary keys are underlined. Give an expression in relational algebra for each of the following queries. Wizard
Consider the following table definition, where the primary keys are underlined. Give an expression in relational algebra for each of the following queries. Wizard (wID integer, wName string, age integer) Class (CID integer, cName string) Takes (wID integer, cID integer, Teacher string, Points integer, year integer) 1. Find the names of Wizards who Take the class Divination (cName = 'Divination') 2. Find the names of Wizards who have taken class with the teacher McGonagall (Teacher = 'McGonagall') 3. Find the names of all the classes a Wizard named George has taken (wName = 'George') 4. Find the names of the wizards who have taken at least one class 5. Find the names of wizards who have taken the class 'Muggle Studies' or 'Potions' 6. Find the names of wizards who have taken both 'Muggle Studies' AND 'Potions' 7. Find the wID of wizards over the age of 12 who have not taken 'Flying' 8. Find the names of any wizards who have taken all the classes listed in the database
Step by Step Solution
★★★★★
3.39 Rating (149 Votes )
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