Вы находитесь на странице: 1из 2

Q. Create a simple transaction log (using the format shown in Table 10.

14)
to represent the actions of the transactions in Problems 6a and 6b.
Problems 6 (a - b)

Answer:

Well, before committing to the solution, first understand what Transaction log
is:
Transaction log is a feature in the DBMS which is used by the DBMS software
to keep all the information that contain a description of all database transaction
executed by the database. This transaction plays the major role in the
maintenance of database system.

Now get back to our question,


We have to create the transaction log that represent the actions of the
transaction given in problem 6(a) and 6(b)

First define the attributes of the table,


 The “Trans_Num” represent the transaction number.
 Transaction number T1 demonstrate the problem 6(a).
 Transaction number T1 demonstrate the problem 6(b).
Trans_I Trans Prev_ Next Operation Table Value_I Attribute Before_Tra After_Trans
D _Num Ptr _Ptr
D ns
T1 NULL 2 START *START
1
Trans.
T1 1 3 INSERT INVOICE 10983 10983, 10010,
2 11-May-2012,
118.80, 30, OPEN
T1 2 4 INSERT LINE 10983, 1 10983, 1,
3 11QER/31, 1,
110.00
11QER/31 P_QTYOH 47 46
4 T1 3 5 UPDATE PRODUCT
10010 CUS_BALANCE 345.67 464.47
5 T1 4 6 UPDATE CUSTOMER
10010 CUS_DATELSTPUR 5-May-2010 11-May-2012
6 T1 5 7 UPDATE CUSTOMER
NULL
7 T1 6 COMMIT *End Trans.
T2 NULL 9 START *START
8
Trans.
T2 8 10 INSERT PAYMENT 3428 3428, 3-Jun-2012,
9 10010, 100.00,
CASH, None

10010 CUS_BALANCE 464.47 364.47


10 T2 9 11 UPDATE CUSTOMER
10010 CUS_DATELSTPUR 2-May-2010 3-Jun-2012
11 T2 10 12 UPDATE CUSTOMER

NULL
12 T2 11 COMMIT *End Trans.

Вам также может понравиться