QuestionQuestion

Part 1:
Below are 10 statements describing the relational algebra query to be written using the pizza schema, which is reproduced (without the data) here for your reference.
The pizza schema:
Person( name, age, gender)
Frequents( name, pizzeria )
Eats( name, pizza )
Serves( pizzeria, pizza, price )
1.) List all of the pizzas that Amy eats
2.) List the count of pizzas Amy eats
3.) List the count of pizzas all persons eat
4.) List the name and pizzas eaten by people less than 20 years old
5.) List the names of people who eat supreme or cheese pizza
6.) List the names of people who eat supreme and cheese pizza
7.) List the names of all people who eat at least one pizza served by Dominos but who do not frequent Dominos
8.) List all of the pizzerias and pizzas that have a price as much as the most expensive pizza served
9.) List all of the female persons along with the pizzas they eat and how much those pizzas cost at Chicago Pizza
10.) List all pizzas that are eaten only by people younger than 24, or that cost less than $10 everywhere they're served.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

1. List all of the pizzas that Amy eats
Result ←
π pizza(σ name = “Amy” (Person ⋈Person.name = Eats.name Eats ))

2. List the count of pizzas Amy eats
Result ←
ρ R(pizza, no_of_pizza)(pizzaℑcount(*) (π pizza(σ name = “Amy” (Person ⋈Person.name = Eats.name Eats ))))

3. List the count of pizzas all persons eat
a) Note that the result of the PROJECT operation π is a set of distinct tuples
b) Get list of pizzas...

By purchasing this solution you'll be able to access the following files:
Solution.docx.

50% discount

Hours
Minutes
Seconds
$36.90 $18.45
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Database Development Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats