Author

Topic: Database 101: ACID transactions (Read 2003 times)

hero member
Activity: 826
Merit: 1000
see my profile
sr. member
Activity: 840
Merit: 255
SportsIcon - Connect With Your Sports Heroes
March 07, 2014, 07:17:01 PM
#6
 Wink
hero member
Activity: 826
Merit: 1000
see my profile
March 07, 2014, 06:55:56 PM
#5
_
hero member
Activity: 826
Merit: 1000
see my profile
March 06, 2014, 12:57:04 PM
#4
.
hero member
Activity: 826
Merit: 1000
see my profile
March 06, 2014, 12:23:38 AM
#3
..
hero member
Activity: 826
Merit: 1000
see my profile
March 05, 2014, 09:36:06 PM
#2
...
hero member
Activity: 826
Merit: 1000
see my profile
March 05, 2014, 09:35:42 PM
#1
ACID (database transactions)

A database transaction, by definition, must be atomic, consistent, isolated and durable. Database practitioners often refer to these properties of database transactions using the acronym ACID.

atomic
 In an atomic transaction, a series of database operations either all occur, or nothing occurs. A guarantee of atomicity prevents updates to the database occurring only partially, which can cause greater problems than rejecting the whole series outright. In other words, atomicity means indivisibility and irreducibility.

consistent
 In database systems, a consistent transaction is one that starts with a database in a consistent state and ends with the database in a consistent state. Consistent state means that there is no violation of any integrity constraints. Consistency may temporarily be violated during execution of the transaction, but must be corrected before changes are permanently committed to the database. If the transaction would leave the database in an illegal state, it is aborted and an error is reported.

isolated
 In database systems, isolation is a property that defines how/when the changes made by one operation become visible to other concurrent operations
Concurrency control [...] The transaction-related mechanisms typically constrain the database data access operations' timing (transaction schedules) [...]  Constraining database access operation execution typically means reduced performance (rates of execution), [...] Often, when possible without harming correctness, the serializability property is compromised for better performance. However, recoverability cannot be compromised, since such typically results in a quick database integrity violation. [...]

durable
 [...]  durability is the ACID property which guarantees that transactions that have committed will survive permanently. For example, if a flight booking reports that a seat has successfully been booked, then the seat will remain booked even if the system crashes. Durability can be achieved by flushing the transaction's log records to non-volatile storage before acknowledging commitment. In distributed transactions, all participating servers must coordinate before commit can be acknowledged. This is usually done by a two-phase commit protocol.


ACID failure examples: http://en.wikipedia.org/wiki/ACID#Examples
Jump to: