Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

We have the database INGREDIENT(ingredient-id, name, price-ounce) RECIPE(recipe-

ID: 3886475 • Letter: W

Question

We have the database INGREDIENT(ingredient-id, name, price-ounce) RECIPE(recipe-id, name, country, time) USES(recipe-id, ingredient-id, amount) where ingredient-id is the key of INGREDIENT and a foreign key in USES, recipe-id is the key of RECIPE and a foreign key in USES, and (recipe-id, ingredient) is the key of USES (meaning that an ingredient can be used in more than one recipe, and a recipe may use more than one ingredient). Country is the country where the recipe is from, and time is the amount of time it takes to cook it. Express the following questions in Relational Algebra. Use only the operators seen in class. Make sure to use renaming when appropriate! (a) List the names of recipes that use garlic and take less than 30 minutes to cook. (b) List the names of ingredients used in recipes from France. (c) List the names of recipes that do not use garlic. (d) List the names of ingredients that are not used in any recipe from France. (e) List the names of ingredients that are used in two or more recipes. We have the database CAR (vin, make, model, year, color, num-doors.price) DEALERSHIP (dealer-id, name, brand, address, city, state, zip) LOT (vin, dealer-id, arrival-date) where vin is the primary key of CAR and both a a primary key and a foreign key in LOT (a car can only be in one lot, but it has to exist!), dealer-id is the primary key of DEALERSHIP and a foreign key in LOT, and brand is a value from make or the value 'any': make is one of Toyota, Honda, BMW, etc. Express the following questions in Relational Algebra. Use only the operators seen in class. Make sure to use renaming when appropriate! (a) List the name of dealerships selling any blue Honda (make) Accords (model), 2015 or older (year). (b) List the name of dealerships in Louisville that sell Hondas or Toyotas. (c) List the name of dealerships in Louisville that sell Hondas and Toyotas. (d) List the names of cities with 2 or more BMW dealerships. (e) List the names of dealerships where no car is under $50,000.

Explanation / Answer

Hi, as per chegg policy , we are not supposed to answer more than one question, please post the second one as separate question and you should be able to get your answer in minutes :)

a) name( (time<30)recipe )
this means project names from relation where (select * from recipe where time is less than 30)
b)

c)

all such ingrdients having 2 or more rows in recipe are shown,
Thumbs up if this was helpful, otherwise let me know in comments.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote