Write the following queries in relational algebra Creature (name, category, status) FoodChain (predator, food, percentage) Details: • The values of status in Creature can be: Carnivores, Herbivores, Omnivorous, Saprophagous. • Predator of FoodChainis a foreign key referring to name of Creature. • Food of FoodChain is a foreign key referring to name of Creature. 1. Find the predator(s) whose foods are all known in Creature.( For a predator if the percentages of its foods sum up to 100%,we say that its foods are all known.) 2. List the name of each creature which eats any of the predators of the creature “frog”. 3. List the name of each creature which eats all the predators of the creature “bird”. 4. Find food(s) which are eaten by exactly three predators. 5. List the name of each predator which eats all creatures except itself.
Write the following queries in relational algebra
Creature (name, category, status)
FoodChain (predator, food, percentage)
Details:
• The values of status in Creature can be: Carnivores, Herbivores, Omnivorous, Saprophagous.
• Predator of FoodChainis a foreign key referring to name of Creature.
• Food of FoodChain is a foreign key referring to name of Creature.
1. Find the predator(s) whose foods are all known in Creature.( For a predator if the percentages of its foods sum up to 100%,we say that its foods are all known.)
2. List the name of each creature which eats any of the predators of the creature “frog”.
3. List the name of each creature which eats all the predators of the creature “bird”.
4. Find food(s) which are eaten by exactly three predators.
5. List the name of each predator which eats all creatures except itself.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images