Monday 2 August 2010

Transaction processing system:

Transaction processing system:
A transaction processing system is a set of information which process the data transaction in database system that monitors by transaction programs (a special kind of program).The essence of a transaction program is that it manages data that must be left in reliable state.
Example: If an electronic payment is made, the amount must be withdrawn from one account and added to the other or none at all. In a case of a failure transaction, the partially executed transaction must be rolled back by the TPS.
Characteristics of TPS:
Rapid response: Fast performance with a rapid response time is critical for business
Reliability: A breakdown will disturb the operations or even stop the business.
Inflexibility: Every transaction is processed in the same way regardless of the user.
Controlled processing: The processing in a TPS must support an organization’s operations.
Types of TPS:
1. Batch Processing:
Batch transaction processing collects the transaction data as a batch and processes it later. Its keep for processing at a convenient time.
Features:
• Processing large volume of similar data at lower costs.
• Processing a batch may take several minutes, hours or days
• Used when a time delay will not decrease the usefulness of the results
• Involves a large batch of an identical data type.
Disadvantages:
• The processing schedule is predetermined.
• It will halt immediately if an error occurs in any one if the tasks.
• Errors cannot be corrected during processing. If an error occurs during a batch process, then the error must be corrected and the batch process restarted from the beginning.
• It must have exclusive access and control over its data files.
• Sorting the transaction data is expensive and time consuming.
• Does not provide data that are fully current.


2. Real Time Processing:
Real time transaction processing is the immediate processing of data. It provided instant confirmation of a transaction.
Features:
• Involves using a terminal to enter data and display results.
• Computer network links terminals to mainframe.
• Involves large number of users performing transactions simultaneously
• It also called as online transaction processing.
Concerns:
Concurrency ensures that two users cannot change the same data at the same time.
Atomicity ensures that all of the steps involved in a transaction are completed successfully. if any step fails the systems ceases.
Batch Processing Vs Real time Processing:
Batch Processing Real time Processing
• The database is not accessible at the time of processing

• The data is organized and stored before the master file is updated

• Errors can occur during these steps • Each transaction is unique. It is not part of a group of transactions.

• Requires the master file to be available more often for updating and reference.

• Has fewer errors as transaction data is validated and entered immediately

• More computer operators are required, as the operations are not centralized.

• More difficult to maintain.

ACID properties of Transaction:
Atomicity:
A transaction’s changes to the state are atomic: either all happen or none happen. These changes include database changes, messages, and actions on transducers.
Consistency:
A transaction is a correct transformation of the state. The actions taken as a group do not violate any of the integrity constraints associated with the state. This requires that the transaction be a correct program.
Isolation:
Even though transactions execute concurrently, it appears to each transaction T, that others executed either before T or after T, but not both.
Durability:
Once a transaction completes successfully (commits), its changes to the state survive failures.