Bitcoin Forum
November 07, 2024, 10:07:37 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Database 101: ACID transactions  (Read 2020 times)
drakoin (OP)
Hero Member
*****
Offline Offline

Activity: 826
Merit: 1000

see my profile


View Profile
March 06, 2014, 01:35:42 AM
Last edit: March 06, 2014, 01:47:46 AM by drakoin
 #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

no sign of a signature
drakoin (OP)
Hero Member
*****
Offline Offline

Activity: 826
Merit: 1000

see my profile


View Profile
March 06, 2014, 01:36:06 AM
 #2

...

no sign of a signature
drakoin (OP)
Hero Member
*****
Offline Offline

Activity: 826
Merit: 1000

see my profile


View Profile
March 06, 2014, 04:23:38 AM
 #3

..

no sign of a signature
drakoin (OP)
Hero Member
*****
Offline Offline

Activity: 826
Merit: 1000

see my profile


View Profile
March 06, 2014, 04:57:04 PM
 #4

.

no sign of a signature
drakoin (OP)
Hero Member
*****
Offline Offline

Activity: 826
Merit: 1000

see my profile


View Profile
March 07, 2014, 10:55:56 PM
 #5

_

no sign of a signature
Wipeout2097
Sr. Member
****
Offline Offline

Activity: 840
Merit: 255


SportsIcon - Connect With Your Sports Heroes


View Profile
March 07, 2014, 11:17:01 PM
 #6

 Wink

███████████████████████████████████████████████████████████████
██▀       ▀█       ▀████████████        ▀█         █▀       ▀██
██   ▀██▄▄▄█   ██   ████████████   ███   ████   ████   ▀██▄▄▄██
███▄     ▀██       ▄████████████       ▄█████   █████▄     ▀███
██▀▀▀██▄   █   █████████████████   █▄  ▀█████   ████▀▀▀██▄   ██
██▄       ▄█   █████████████████   ██▄  ▀████   ████▄       ▄██
███████████████████████████████████████████████████████████████
██       ██▀      ▀█████████████    ▀██   █████████████████████
████   ███   ▄██▄   ████████████     ▀█   █████████████████████
████   ███   ████████   ████   █   ▄  ▀   █████████████████████
████   ███   ▀██▀   █   ████   █   █▄     █████████████████████
██       ██▄      ▄███        ██   ██▄    █████████████████████
███████████████████████████████████████████████████████████████
██████████████
██
██
██
██
██
██
██
██
██
██
██
██████████████
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████                                                             ████████████████████████████████████████████████
.
.
.

████████████████████████████████████████████████████████████          ████████████████                                 ██████████████████████████████████████████████████████████████████████████████████████
██████████████
██
██
██
██
██
██
██
██
██
██
██
██████████████
███████
██
██
██
██
██
██
██
██
██
██
██
███████
███████
██
██
██
██
██
██
██
██
██
██
██
███████
►►  Powered by
BOUNTY
DETECTIVE
drakoin (OP)
Hero Member
*****
Offline Offline

Activity: 826
Merit: 1000

see my profile


View Profile
March 12, 2014, 12:26:17 PM
 #7

Wink



no sign of a signature
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!