EMMA MOORE

Batch Processing

Using batch processing input data is grouped together into batches. No data is processed until a complete batch has been put together. Then all the data in a batch is processed in one go. There may be a long time delay between data being input into the system and the data being processed.

In this type of system the important data that the computer stores all the time is kept in a file called the master file. The data in the master file is sorted into order using one of the fields in the records in the file, known as the primary key field. The primary key field must uniquely identify each record in the file.

Each piece of input data (which will update the contents of the master file) is known as a transaction. All the input data is put together into a batch in a file called the transaction file. There are three different types of transaction that any processing system will have to cope with. They are:

  • Add a new record to the master file.
  • Delete a record from the master file.
  • Amend / update an existing record in the master file.

At some predetermined time (e.g. the end of the day or week) the computer system will process the data stored in the transaction file and make any changes that are necessary to the master file as a result of the transactions. This will produce an updated master file and an error report detailing any transactions that could not be processed for some reason.

Before this processing can take place the transactions must be prepared for processing. To do these two operations must be carried out:

Validating: Each transaction that is entered is validated to check that it is unlikely to halt processing by causing an error. It is very important that processing is not halted in a batch processing system because processing often takes place overnight without a human operator being present. If an invalid transaction caused the processing to stop then a whole night's processing time could be lost. Transactions are usually validated as the operator keys them in. Any errors that are found can be reported and corrected straight away.

Sorting: The data in the transaction file is sorted into order using the same primary key field as the master file. Sorting cannot take place until the whole batch of transactions entered and stored in a file. The transaction and master files need to be put into the same order before processing occurs because the two files are processed sequentially. The files are usually stored on a serial access medium such as magnetic tapes. If the records on the tapes were not sorted into order then whenever a transaction record was read from the transaction file the computer system would have to waste a lot of time searching for the matching record in the master file.

Join now!

How often batches of data are processed will depend upon the application (i.e. the job that is being done). Batch processing is usually only carried out on mainframe computers and when very large volumes of data have to be processed in a database.

Above is an example this of a data flow diagram, which shows what happens in a batch processing system.

BATCH PROCESSING ALGORITHM

During the processing phase (represented in the bottom half of the flowchart above) all of the records are copied from the master file to the new master file. Any changes that must ...

This is a preview of the whole essay