transactions in databases transactions in databases another important concept within database is that of transaction transaction represents unit of work performed within database management system (or similar systemagainst database instanceand is independent of any other transaction transactions in database environment have two main purposes to provide unit of work that allows recovery from failures and keeps database consistent even in cases of system failurewhen execution stops (completely or partiallythis is because either all the operations within transaction are performed or none of them are thusif one operation causes an error then all the changes being made by the transaction thus far are rolled back and none of them will have been made to provide isolation between programs accessing database concurrently this means that the work being done by one program will not interact with another programs work database transactionby definitionmust be atomicconsistentisolated and durableatomic this indicates that transaction represents an atomic unit of workthat is either all the operations in the transaction are performed or none of them are performed consistent once completed the transaction must leave the data in consistent state with any data constraints met (such as row in one table must not reference an non-existent row in another table in one to many relationship etc isolated this relates to the changes being made by concurrent transactionsthese changes must be isolated from each other that isone transaction cannot see the changes being made by another transaction until the second transaction completes and all changes are permanently saved into the database durable this means that once transaction completes then the changes it has made are permanently stored into the database (until some future transaction modifies that datadatabase practitioners often refer to these properties of database transactions using the acronym acid (for atomicconsistentisolateddurablenot all databases support transactions although all commercialproduction quality databases such as oraclemicrosoft sql server and mysqldo support transactions