Question
Databases, 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,
Databases, 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)
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. Show the code for the stored procedure.
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