Question
Databases 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,
Databases
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)
Using the tables, write the SQL code to represent each of the following transactions. Use Start Transaction and Commit to group the SQL statements into logical transactions.
A. Show the complete transaction for adding two new star wars: Ewok costumes on October 30, 2017 to your database, one size large, and one size small. Both of these costumes are now available for rental. Be sure to add the costumetype as part of this transaction.
B. Show the complete transaction for one of your customers placing a rental on October 31, 2017 for the two new costumes added in A.
C. Create a simple transaction log to represent the actions of the two previous transactions
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