22/09/2021
A database transaction signifies a unit of work performed within a database management system against a database and treated coherently, and reliably independently of other transactions.
Transactions in a database environment have two purposes:
1. To provide reliable units of work that allow correct recovery from failures and keep a database consistent even in cases of system failure, when ex*****on stops and many operations upon a database remain uncompleted, with unclear status.
2. To provide isolation between programs accessing a database concurrently.
If this isolation is not given, the programs' outcomes are possibly erroneous.
A database transaction, by definition, must be atomic (it must either be complete in its entirety or have no effect whatsoever), consistent (it must conform to existing constraints in the database), isolated (it must not affect other transactions), and durable (it must get written to persistent storage).
Database practitioners often refer to these properties of database transactions using the acronym ACID.
If you like this kind of posts, then do follow .me