Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This the database homwork. Using only Projection, selection, join 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
This the database homwork. Using only Projection, selection, join
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,000Step 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