Introduction to Transaction Processing
Single user system :
In this at-most, only one user at a time can use the system.
Multi-user system :
In the same, many users can access the system concurrently.
Concurrency can be provided through :
- Interleaved Processing –
In this, the concurrent execution of processes is interleaved in a single CPU. The transactions are interleaved, meaning the second transaction is started before the primary one could finish. And execution can switch between the transactions. It can also switch between multiple transactions. This causes inconsistency in the system.
- Parallel Processing –
It is defined as the processing in which a large task into various smaller tasks and smaller task also executes concurrently on several nodes. In this, the processes are concurrently executed in multiple CPUs.
It is a logical unit of database processing that includes one or more access operations. (read-retrieval, write-insert or update). It is a unit of program execution that accesses and if required updates various data items.
A transaction is a set of operations that can either be embedded within an application program or can be specified interactively via a high-quality language such as SQL.
Consider a transaction that involves transferring $1700 from a customer’s savings account to a customer’s checking account. This transaction involves two separate operations: debiting the savings account by $1700 and crediting the checking account by $1700. If one operation succeeds but the other doesn’t, the books of the bank will not balance.
Transaction boundaries :
Begin and end boundaries. In this, you can say an application program may have several transactions and transactions separated by the beginning and end of the transaction in an application program.
Granularity of data :
- The size of data item is called its granularity.
- A data item can be an individual field (attribute), value of some record, a record, or a whole disk block.
- Concepts are independent of granularity
- Batch processing or real-time processing available.
- Reduction in processing time, lead time and order cycle time.
- Reduction in inventory, personnel and ordering costs.
- Increase in productivity andcustomer satisfaction
- High setup costs.
- Lack of standard formats.
- Hardware and software incompatibility.