Question: CHATGPT does not work import database ( found below ) on RelaX and do the following Write the relational algebra expression for the following queries

CHATGPT does not work
import database(found below) on RelaX and do the following
Write the relational algebra expression for the following queries using the syntax on RelaX.
Provide the output of the expression (schema of the table and content).
Verify the solution on Relax.
Person(name, age, gender)// name is PK
Frequents(name, pizzeria)//[name,pizzeria] is PK
Eats(name, pizza)//[name,pizza] is PK
Serves(pizzeria, pizza, price)//[pizzeria,pizza] is PK
a. Find all pizzerias frequented by at least one person under the age of 20.
b. Find all pizzas eaten by at least one female over the age of 22.
c. Find pizzerias frequented by teenagers eating mushroom or pepperoni. (A teenager is a person of age 13-19).
d. Find pizzerias frequented by teenagers eating mushroom and pepperoni.
e. Find the names of all females who eat at least one pizza served by Mod Pizza.
f. Find all pizzerias that serve at least one pizza for less than $10 that both Amy and Fay eat.
g. Find the names of all people who eat at least one pizza served by Dominos but who do not frequent Dominos.
h. Find all pizzas that are eaten only by people younger than 24, or that cost less than $11 everywhere they're served.
i. Find the age of the youngest person (or people) who eat pepperoni pizza.
j. Find all pizzerias that serve pizzas only eaten by people over 29.
k. Find all pizzerias that serve every pizza eaten by people over 29.
l. Find all pizzerias that serve the cheapest cheese pizza.
m. Find all pizzerias exactly serving only two pizzas.
Database:
group: pizzas
Person ={
name:string, age:number, gender:string
Amy, 16, female
Ben, 21, male
Cal, 33, male
Dan, 13, male
Eli, 45, male
Fay, 21, female
Gus, 24, male
Hil, 30, female
Ian, 18, male
}
Eats ={
name:string, pizza:string
Amy, mushroom
Amy, pepperoni
Ben, cheese
Ben, pepperoni
Cal, supreme
Dan, cheese
Dan, mushroom
Dan, pepperoni
Dan, sausage
Dan, supreme
Eli, cheese
Eli, supreme
Fay, mushroom
Gus, cheese
Gus, mushroom
Gus, supreme
Hil, cheese
Hil, supreme
Ian, pepperoni
Ian, supreme
}
Frequents ={
name:string, pizzeria:string
Amy, "Pizza Hut"
Ben, "Papa Jones"
Ben, "Pizza Hut"
Cal, "Christians Pizza"
Cal, "Mod Pizza"
Dan, "Christians Pizza"
Dan, "Mod Pizza"
Eli, "Papa Jones"
Eli, "Mod Pizza"
Fay, "Dominos"
Fay, "Little Caesars"
Gus, "Papa Jones"
Gus, "Pizza Hut"
Hil, "Dominos"
Hil, "Pizza Hut"
Hil, "Mod Pizza"
Ian, "Dominos"
Ian, "Christians Pizza"
Ian, "Mod Pizza"
}
Serves ={
pizzeria:string, pizza:string, price:number
"Papa Jones", cheese, 7.75
"Papa Jones", supreme, 8.5
"Dominos", cheese, 9.75
"Dominos", mushroom, 11
"Little Caesars", cheese, 7
"Little Caesars", mushroom, 9.25
"Little Caesars", pepperoni, 9.75
"Little Caesars", sausage, 9.5
"Christians Pizza", cheese, 7
"Christians Pizza", pepperoni, 8
"Christians Pizza", supreme, 8.5
"Pizza Hut", cheese, 9
"Pizza Hut", pepperoni, 12
"Pizza Hut", sausage, 12
"Pizza Hut", supreme, 12
"Mod Pizza", cheese, 9.25
"Mod Pizza", pepperoni, 8
"Mod Pizza", sausage, 9.75
}

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!