Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In a simple database, there are six (6) tables. The database keeps track of restaurants, their owners, customers and their favorite foods. In particular, an

image text in transcribedimage text in transcribed

In a simple database, there are six (6) tables. The database keeps track of restaurants, their owners, customers and their favorite foods. In particular, an owner can own several restaurants. In each restaurant different types of foods are served. Different customers of the restaurant like different types of foods. The database schema is as follows: DATABASE: RESTAURANT (Restaurant_name [pk], City, Phone, Owner_SSN [fk]) FOOD (Food_name [pk], Type, Country) CUST (SSN(pk], Name, Birth year, Fav_food[fk], Gender) LIKES (SSN[fk], Food[fk]) SERVES (Restaurant[fk], Food[fk]). OWNER (SSN(pk], Name, City, Address, Phone) Provide a relational algebra for the following queries: 3) List the foods served by at least one restaurant and liked by at least one customer. 4) List the SSN and name of customers who like their favorite food. 5) List the name and phone number of all owners who do not serve Bread Pudding in their restaurants. 6) Customers should like their favorite food. List the SSN and name of all customers who DO NOT like their favorite food. 7) List the name of the restaurants whose owners live in Baton Rouge. 8) List the name of owners whose restaurants serve food type A. 9) List phone numbers that are recorded both for the restaurant and the owner phone (you cannot use JOIN for this question) 10) List name of owners who live in the same city that Mr. Jacob (name of one of the owners) lives. In a simple database, there are six (6) tables. The database keeps track of restaurants, their owners, customers and their favorite foods. In particular, an owner can own several restaurants. In each restaurant different types of foods are served. Different customers of the restaurant like different types of foods. The database schema is as follows: DATABASE: RESTAURANT (Restaurant_name [pk], City, Phone, Owner_SSN [fk]) FOOD (Food_name [pk], Type, Country) CUST (SSN(pk], Name, Birth year, Fav_food[fk], Gender) LIKES (SSN[fk], Food[fk]) SERVES (Restaurant[fk], Food[fk]). OWNER (SSN(pk], Name, City, Address, Phone) Provide a relational algebra for the following queries: 3) List the foods served by at least one restaurant and liked by at least one customer. 4) List the SSN and name of customers who like their favorite food. 5) List the name and phone number of all owners who do not serve Bread Pudding in their restaurants. 6) Customers should like their favorite food. List the SSN and name of all customers who DO NOT like their favorite food. 7) List the name of the restaurants whose owners live in Baton Rouge. 8) List the name of owners whose restaurants serve food type A. 9) List phone numbers that are recorded both for the restaurant and the owner phone (you cannot use JOIN for this question) 10) List name of owners who live in the same city that Mr. Jacob (name of one of the owners) lives

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

2. How do we perceive middle-frequency sounds (100 to 4000 Hz)?

Answered: 1 week ago

Question

please dont use chat gpt AI 6 8 0 .

Answered: 1 week ago

Question

5. Prepare for the role of interviewee

Answered: 1 week ago

Question

6. Secure job interviews and manage them with confidence

Answered: 1 week ago