Question: Databases Code SQL statements for the following: CUSTOMER(CustomerID, FirstName, LastName, Street, City, State, Zip, Phone) RENTAL(RentalID, RentalDate,NumberOfDays, RentalAmount, Deposit, Tax, TotalAmount, CustomerID, ReturnDate, AmountReturned) LINEITEM(RentalID,

Databases

Code SQL statements for the following:

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

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!