Question: Relational Division Operations (15 points) Given these relations: monkey_likes(name, food) monkey_foods(food) food apples oranges bananas name Bobo Bobo Jojo Jojo Jojo Lulu Lulu food apples



Relational Division Operations (15 points) Given these relations: monkey_likes(name, food) monkey_foods(food) food apples oranges bananas name Bobo Bobo Jojo Jojo Jojo Lulu Lulu food apples bananas apples oranges bananas oranges bananas apples oranges bananas tofu Guenter Guenter Guenter Guenter The relational division operation can be defined in multiple ways, depending on exactly how it should behave in different circumstances. For example, the relational division operation in the book will ignore the tuple (Guenter, tofu) when dividing monkey_likes by monkey_foods; thus, monkey_likes = monkey_foods will be {Jojo), (Guenter)}. SQL doesn't provide a relational division operation directly, but it is straightforward to implement using grouping and aggregation operations, which SQL does provide. Since we will begin working with SQL in the next assignment, let's look at how we might implement relational division with the tools that SQL provides. c) Write a relational algebra expression that computes r + s using grouping and aggregation instead of the approach used above. You can of course use other relational algebra operations as needed, except do not use the set---difference relational operator for this solution. (You can use set---difference for manipulating schemas, but not relations.) Make sure your solution doesn't give false positives; for example, if the tuples {(Henry, apples), (Henry, bananas), (Henry, tofu)} were added to monkey_likes, make sure that Henry won't appear in the result. (Henry likes three foods, and three foods are listed in monkey_foods...)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
