Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using the following database code: USE MenuDatabase CREATE TABLE [dbo].[Menu]( [ID] INT PRIMARY KEY, [MenuTitle] [nvarchar](50) NULL, [MenuDescriptionText] [nvarchar](50) NULL) CREATE TABLE [dbo].[MenuGroups]( [ID] INT
Using the following database code:
USE MenuDatabase CREATE TABLE [dbo].[Menu]( [ID] INT PRIMARY KEY, [MenuTitle] [nvarchar](50) NULL, [MenuDescriptionText] [nvarchar](50) NULL) CREATE TABLE [dbo].[MenuGroups]( [ID] INT PRIMARY KEY, [MenuID] INT NOT NULL, [MenuGroupText] [nvarchar](50) NOT NULL, [MenuGroupDescriptionText] [nvarchar](50) NULL, FOREIGN KEY (MenuID) REFERENCES Menu(ID)) CREATE TABLE [dbo].[MenuItems]( [ID] INT PRIMARY KEY, [MenuGroupsID] INT NOT NULL, [MenuItemTitle] [nvarchar](50) NOT NULL, [MenuItemDescriptionText] [nvarchar](50) NULL, FOREIGN KEY (MenuGroupsID) REFERENCES MenuGroups(ID)) CREATE TABLE [dbo].[Ingredients]( [ID] INT PRIMARY KEY, [IngredientTitleText] [NVARCHAR](50) NOT NULL, [IngredientDescriptionText] [NVARCHAR](200) NULL ) CREATE TABLE [dbo].[IngredientsInItems]( [ID] INT PRIMARY KEY, [IngredientsID] INT NOT NULL, [MenuItemID] INT NOT NULL, [DescriptionText] [NVARCHAR](200), FOREIGN KEY (IngredientsID) REFERENCES Ingredients(ID), FOREIGN KEY (MenuItemID) REFERENCES MenuItems(ID))
Create a stored procedure sp_InsertIngredient that INSERTS an ingredient and places it in a Menu Item.
Step 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