Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 StockStep 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