
there are tree tables.
master_stock(stockcode {pk}, name, qty, sprice, bprice);
master_tran(trannum {pk}, trdate, note);
master_list(trannum {pk}, stockcode {fk}, qty, sprice);
TRANNUM field in the table used as MASTER_TRAN code transactions that occur in accordance with the date and serial transaction example: 20081014001, 20081014002 ... etc. (charging TRANNUM so here are affected in date of the occurrence of the transaction, the transaction serial number on the day)
(parent transaction information)
master_list while the table is used to record details transactions that occur in accordance with the transaction number (TRANNUM) MASTER_TRAN on the table.
Logically:
- A number based on the transaction MASTER_TRAN table (take appropriate filter records last date) then add the number 1) example: if the last record is 20081014050 (OLD), so that a new course record 20081014051 (NEW).
- And write new data MASTER_LIST based on the code.
=========================
The process in computer A
=========================
T1: create a number of Transaction (completed / commit) time required T1, T2, T3 (the number is obtained 20081014050)
T2: record list of goods, the time needed T4, T5, t6, t7, t8, T9, t10, t11, t12, t13, t14
==========================
The Proces in computer B
==========================
T1: create a transaction number (completed / commit) time needed T4, T5, t6 (a number that is obtained 20081014051)
T2: record list of goods, the time needed is t7, t8 (commit)
From the two processes occur if the computer T_crashes or T_checkpoint in t9 time which must UNDO and Redo?






1 comment:
Ok, i will try to answer the problem...
From the picture above, we conclude that the task which has to be undo is AT2, and the tasks which have to be undo are AT1, BT1, BT2...
-arie-
Post a Comment