Question
Write a stored procedure called AddCrewMember that accepts a movie id, crew id, position name, and wage. Ensure the wage is between $8,000 and $80,000.
Write a stored procedure called AddCrewMember that accepts a movie id, crew id, position name, and wage. Ensure the wage is between $8,000 and $80,000. Add the person to the movie (MovieCrew) and update the budget of the movie by the person's wage. Be sure that the statements succeed or fail as a group and validate the success of each DML statement before proceeding to the next step.
ERD Director Genre MovieStudio Legend DirectorID int PK GenreCode int PK MovieStudioID int PK FirstName varchar(30) GenreName varchar(30) MovieStudioName varchar(50) One Many LastName varchar(30) City varchar(30) Primary Key - PK Province char(2) Foreign Key - FK Phone char(12) Email varchar(50) ContactFirstName varchar(30) ContactLastName varchar(30) Reviewer Rating Movie Crew Position ReviewerID int PK RatingCode tiny int PK MovieID int PK CrewID int PK PositionID int PK FirstName varchar(30) RatingDescription varchar(50) Title varchar(80) FirstName varchar(30) PositionName varchar(40) LastName varchar(30) ReleaseDate smalldatetime LastName varchar(30) Organization varchar(50) Length small int Budget money ProjectedRevenue money DirectorID (FK) int GenreCode (FK) int MovieStudioID (FK) int MovieCrew MovieReview MovieID (FK) int MovieID (FK) int CrewID (FK) int ReviewerID (FK) int Wage small money RatingCode (FK) tiny int PositionID (FK) int P
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