Question: 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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!