I tried to ru this through MySQL, but the tables don\'t match what he\'s asking
ID: 3601156 • Letter: I
Question
I tried to ru this through MySQL, but the tables don't match what he's asking for...
Assignment 7 Directions
Using the SQL Code below, complete the transaction table. Transaction table entries a through d has been completed for you. Follow the process to complete the transaction table entry for c through e.
BEGIN TRANSACTION
INSERT INTO TRUCK
i.VALUES (124, 2210000.00, .08, ‘Mack’, ‘Mack5, ‘2014-10-15’, 12, ‘Natural Gas’);
INSERT INTO MAINTENANCE
i.VALUES (1313, ‘2014-11-15’, ‘Oil’, 238.20, 124)
UPDATE FUELUP
i.SET NoGallons = 13.77
ii.WHERE FuelID = 100;
COMMIT;
TRL ID
TRX
NUM
PREV
PTR
NEXT
PTR
OPERATION
TABLE
ROW ID
ATTRIBUTE
BEFORE
VALUE
AFTER
VALUE
987
101
Null
988
Begin Trans
* Start Trx.
988
101
988
989
INSERT
TRUCK
124
124, 2210000.00, .08, ‘Mack’, ‘Mack5, ‘2014-10-15’, 12, ‘Natural Gas’
989
990
12
991
TRL ID
TRX
NUM
PREV
PTR
NEXT
PTR
OPERATION
TABLE
ROW ID
ATTRIBUTE
BEFORE
VALUE
AFTER
VALUE
987
101
Null
988
Begin Trans
* Start Trx.
988
101
988
989
INSERT
TRUCK
124
124, 2210000.00, .08, ‘Mack’, ‘Mack5, ‘2014-10-15’, 12, ‘Natural Gas’
989
990
12
991
Explanation / Answer
Prev pointer implies trl id of previous row. It should be 987 not 988.
Next pointer is next row's trl id
Operation is what is performed on table
Attribute of column/value
After = Updated value
TRL ID TRX PREV NXT OPERATION TABLE ROW ID ATTRIBUTE BEFORE AFTER 987 101 Null 988 Begin Trans *Strt Trx ’ 988 101 987 989 INSERT Truck 124 124, 2210000.00, .08, ‘Mack’, ‘Mack5, ‘2014-10-15’, 12, ‘Natural Gas 989 101 988 990 INSERT Maintenance 1313 1313, ‘2014-11-15’, ‘Oil’, 238.20, 124 990 101 989 991 UPDATE FUELUP 100 UNSIGNED 12 13.77 991 101 990 Null COMMIT *End Trx