Question: Consider a database with the following schema Person (name, age, gender) name is a key Frequents (name, iceCreamShop) (name, ice cream shop) is a key

Consider a database with the following schema

Person (name, age, gender) name is a key

Frequents (name, iceCreamShop) (name, ice cream shop) is a key

Eats (name, flavor) (name, flavor) is a key

Sells (iceCreamShop, flavor, price) (iceCreamShop, flavor) is a key

Find all the ice cream shops frequented by males over 21 years old.

Find all the names of females that eat vanilla ice cream but not chocolate.

Find all the names of males that eat either strawberry or/and pistachio ice cream.

Find all the ice cream shops where Sam likes at least one of their flavors and each cost less than $5.

For each person, find all ice cream flavors the person eats that are not served by any ice cream shop the person frequents. Return the name of the person and the ice cream flavor in pairs.

Find an ice cream shop that is frequented by people older than 30 but younger than 40 years old.

Find the ice cream shop with the most expensive scoop of vanilla ice cream, if theres more than one return all that apply.

Step by Step Solution

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!