Question: Create a table for reservations. Store the customer ID, reservation start date, reservation end date, and a costume ID. Create and test a stored procedure

Create a table for reservations. Store the customer ID, reservation start date, reservation end date, and a costume ID. Create and test a stored procedure to create a reservation. Assume that the procedure receives the customers first name, last name, the customers home phone number, the reservation start date, reservation end date, and the costume ID. If the customer already exists in the database, use the existing customer data. Otherwise, create a new customer record. Make sure that the costume ID is valid and exists in the costume table. This is MySQL

CUSTOMER(CustomerID, FirstName, LastName, Street, City, State, Zip, Phone)

RENTAL(RentalID, RentalDate,NumberOfDays, RentalAmount, Deposit, Tax, TotalAmount, CustomerID, ReturnDate, AmountReturned)

LINEITEM(RentalID, CostumeID, Rate, Deposit)

COSTUMETYPE(TypeID, Description, Photo, DailyRentalRate, DepositRate, ReplacementCost)

COSTUME(CostumeID, Size, Availability, DatePurchased, CostumeType)

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!