Question: use the following code to create your own query that uses two FROM clauses : Create table USERS ( UserID int not null auto _
use the following code to create your own query that uses two FROM clauses :
Create table USERS
UserID int not null autoincrement,
FirstName varchar not null,
LastName varchar not null,
SignIn date default curdate
Primary KeyUserID
;
Create table RECIPE
RecipeID int not null autoincrement,
UserID int not null,
Name varchar not null,
Published date default curdate
Primary KeyRecipeID
Foreign KeyUserID references USERSUserID on delete cascade
;
Create table RECIPESTEPS
RecipeID int not null,
Step int not null,
StepDescription varchar not null,
Primary KeyRecipeID Step
Foreign Key RecipeID references RECIPERecipeID on delete cascade,
checkStep
checkcharlengthStepDescription
;
Create table RECIPESAVED
UserID int not null,
RecipeID int not null,
Primary KeyUserID RecipeID
Foreign Key RecipeID references RECIPERecipeID on delete cascade,
Foreign Key UserID references USERSUserID on delete cascade
;
Create table USERFOLLOW
UserID int not null,
FollowID int not null,
Primary KeyUserID FollowID
Foreign KeyUserID references USERSUserID on delete cascade,
Foreign KeyFollowID references USERSUserID on delete cascade
;
Create table INGREDIENTS
RecipeID int not null,
IngredientName varchar not null,
Price decimal not null default checkPrice
Primary KeyRecipeID IngredientName
Foreign Key RecipeID references RECIPERecipeID on delete cascade
;
Create table USERRATING
UserID int not null,
RecipeID int not null,
Rating int default checkRating
Primary KeyUserID RecipeID
Foreign KeyUserID REFERENCES USERSUserID on delete cascade,
Foreign KeyRecipeID REFERENCES RECIPERecipeID on delete cascade
;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
