A transaction is a unit of program that involves accessing and modifying the data, ensuring that the database remains consistent even in the case of failures or interruptions.
Transaction processing refers to the management of transactions within a database system.
- The goal of transaction processing is to guarantee data integrity, consistency, and availability, despite system crashes, power failures, or other unexpected events.
Transaction Processing systems are systems with large databases and hundreds of concurrent users executing database transactions.
- Examples: Airline Reservation, banking, online shopping etc.
Desirable Properties of Transactions
A transaction is a set of operations that are executed as a single unit, which could involve reading or modifying data in the database.
The desirable properties of transactions are typically referred to as ACID properties, which stand for:
- Atomicity: A transaction is atomic, meaning it either fully completes or not at all. If any part of the transaction fails, the entire transaction is rolled back to maintain consistency.
- Consistency: A transaction brings the database from one valid state to another, ensuring that integrity constraints are maintained.
- Isolation: Each transaction operates independently of others, and the intermediate state of a transaction is not visible to other transactions.
- Durability: Once a transaction has been committed, its effects are permanent, and it survives system crashes.
A system in transaction processing refers to the environment that handles the execution of transactions, including the hardware, software, and the database itself.