Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1 : Write the appropriate relational algebra that maps to the following functionality: a) Retrieve all users whose name is Bob b) Find all

image text in transcribed

Problem 1 : Write the appropriate relational algebra that maps to the following functionality: a) Retrieve all users whose name is Bob b) Find all business categorized as Mexican c) Find the UserID of all users that reviewed Taco bell. d) Retrieve the UserID of all users that rated Mexican restaurants e) Retrieve all users who joined Yelp in 2018 and rated the Pita Jungle restaurant. f) Find two different relational algebra ways to: Retrieve all restaurants rated by users that joined Yelp in either Year 2016 or 2018. g) Find users who have rated every single business except Chinese restaurants

Users: The Users relation has the following columns (attributes): (1) UserID is a unique identifier for each user (2) name (3) yelping since UserID Name Alice Bob Yelping since 2011-01-01 2011-01-02 Businesses (assume they are restaurants): A business has a unique id, name. A business has one or more categories (stored in a string) BusinessID Name Taco bell Pita jungle Categories Tacos Mexican Mediterranean American Reviews: The Reviews relation consists of the following attributes: (1) UserID: the ID of a user that exists in the users relation. (2) BusinessId: the ID of a business that exists in the Businesses relation (2) Review: a numerical value between 1 and 5 that the user assigned to the business. Note that a user may review a business only once UserID BusinessID Review 1.5 4.0 2

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Databases Theory And Applications 27th Australasian Database Conference Adc 20 Sydney Nsw September 28 29 20 Proceedings Lncs 9877

Authors: Muhammad Aamir Cheema ,Wenjie Zhang ,Lijun Chang

1st Edition

3319469215, 978-3319469218

More Books

Students also viewed these Databases questions

Question

=+35-5 Discuss how smart thinkers use intuition.

Answered: 1 week ago

Question

Show the properties and structure of allotropes of carbon.

Answered: 1 week ago

Question

D How will your group react to this revelation?

Answered: 1 week ago