Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CJD
The entire file must usually be copied in order to For operations that are not very time-sensitive.
update it To save total processing time: by improving file access
time, or by reducing network delays.
Records may be fixed or variable length
CJD CJD
CJD CJD
1
Master File Update The Batch Process
Updates to the master file are accumulated or Transaction
Master
batched in a transaction file File
CJD CJD
Change Deletion
Change transactions contain field values that are Delete transactions only need to specify the
to be changed on the master file transaction code and key value.
All records to be modified must exist in master All records to be deleted must exist in master
file before the update. file before the update.
The master file record is read into main These records must not be included in the
memory and updated before it is copied into new master file.
the new master file.
Deleting these records require gaps to be
closed.
CJD CJD
2
Multiple Transactions Per Key Audit and Error Files
Files or Listings produced by maintenance runs :
There may be zero, one or more transactions per
key value in the transaction file. Audit File :
An addition, several changes and a deletion also called control listing or audit trail
(or other combinations) may have been contains maintenance run …
transacted since the master file was last details (date, time, location, etc.) and
updated.
statistical summary of transaction updates (old and
Transactions for the same key value must be new master file record counts, transaction count,
sorted by date/time or sequence number. successful and unsuccessful add, change delete
counts, etc.)
Error File :
invalid transactions and processing errors
CJD CJD
3
Case Analysis Algorithm Simulation
Case 1 : master_key < trans_key Transaction File
Master File Student_Nu Seq_N Updte Tuition_
Case 2 : master_key > trans_key Student_Nu Tuition_ mber (Key) umber _Code Balance
Case 2a : one transaction for a non-existent mber (Key) Balance 2009000010 1 A 25000.00
master_key (must be an ADD) 2009000020 5000.00
2009000020 1 C 0.00
2009000040 20000.00 2009000030 1 A 25000.00
Case 2b : multiple transactions for a non-existent
2009000060 10000.00 2009000030 2 C 8000.00
master_key (first must be ADD)
2009000070 15000.00 2009000050 1 D
Case 3 : master_key = trans_key 2009000090 0.00 2009000060 1 D
Case 3a : one transaction for an existing 2009000100 9000.00 2009000070 1 C 12000.00
master_key (must be CHANGE or DELETE) 2009000070 2 D
Case 3b : multiple transactions for an existing 2009000080 1 A 7000.00
master_key (first must be CHANGE or DELETE) 2009000090 1 A 1000.00
CJD CJD
CJD CJD
CJD CJD