Question: This is a database management systems course problem. 1 . Consider the following SQL code for updating a database: On May 1 1 , 2

This is a database management systems course problem.
1. Consider the following SQL code for updating a database:
On May 11,2016, customer 10010 makes a credit purchase (30 days) of one unit of product 11QER/31 with a unit price of $110.00; the tax rate is 8 percent. The invoice number is 10983, and this invoice has only one product line.
BEGIN TRANSACTION
INSERT INTO INVOICE
i. VALUES (10983,10010,11-May-2018,118.80,30,OPEN);
INSERT INTO LINE
i. VALUES (10983,1,11QER/31,1,110.00);
UPDATE PRODUCT
i. SET P_QTYOH = P_QTYOH 1
ii. WHERE P_CODE =11QER/31;
UPDATE CUSTOMER
SET CUS_DATELSTPUR =11-May-2018, CUS_BALANCE = CUS_BALANCE +118.80
WHERE CUS_CODE =10010;
COMMIT;
The following is the transaction log that is created:
TRL
ID
TRX
NUM
PREV
PTR
NEXT
PTR
OPERATION
TABLE
ROW ID
ATTRIBUTE
BEFORE
VALUE
AFTER
VALUE
987
101
Null
1023
START
* Start Trx.
1023
101
987
1026
INSERT
INVOICE
10983
10983,10010,
11-May-2018,118.80,30, OPEN
1026
101
1023
1029
INSERT
LINE
10983,1
10983,1,11QER/31,1,110.00
1029
101
1026
1031
UPDATE
PRODUCT
A
P_QTYOH
47
46
1031
101
1029
1032
UPDATE
CUSTOMER
10010
CUS_BALANCE
345.67
B
1032
101
1031
1034
UPDATE
CUSTOMER
10010
C
D
E
1034
101
1032
Null
COMMIT
* End Trx.*
1089
102
Null
1091
START
* Start Trx.
Fill in the missing values: A, B. C, D, E

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 Programming Questions!