Question: Database SQL question Answer fully for thumbs up Question 2 (a) A restaurant stores information in a relational database about the ingredients used in each

Database SQL question

Answer fully for thumbs up

Database SQL question Answer fully for thumbs up Question 2 (a) A

Question 2 (a) A restaurant stores information in a relational database about the ingredients used in each of the dishes which it has on its menu. There are two tables with attributes as follows. The primary keys are underlined Recipe Stores Dish Ingredient Quantity Ingredient Supplier Stock The Recipe table records, for each dish listed on the menu, the quantity of each ingre- dient needed for one serving (so for each dish there is one recipe made from a number of ingredients). The Stores table records for each ingredient used in the restaurant, the name of the supplier and the current amount held in stock. The current amount is updated daily (i) The restaurant manager asked "How many ingredients are supplied by Smith?" Write an SQL query that could be used to answer this question (ii) The following query was intended to find out for which dishes on the menu there are not enough ingredients in stock to make 10 servings. SELECT DISTINCT Dish FROM Recipe WHERE Stock

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!