Question
Problem 1 : Write the appropriate relational algebra that maps to the following functionality: a) Retrieve all users whose name is Bob b) Find all
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 2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started