Tim Harsch ([EMAIL PROTECTED]) wrote:
> What is ACID?


>From http://openacs.org/philosophy/why-not-mysql.html (I highly
recommend this article for anyone who is wondering what RDBMS
to choose):

Atomicity 
              Results of a transaction's execution are either all 
              committed or all rolled back. All changes take effect, 
              or none do. Suppose that a user is editing a
              comment. A Web script tells the database to "copy the 
              old comment value to an audit table and update the 
              live table with the new text". If the hard
              drive fills up after the copy but before the update, 
              the audit table insertion will be rolled back. 
Consistency 
              The database is transformed from one valid state to 
              another valid state. A transaction is legal only if 
              it obeys user-defined integrity constraints. Illegal
              transactions aren't allowed and, if an integrity 
              constraint can't be satisfied the transaction is 
              rolled back. For example, suppose that you define a rule
              that postings in a discussion forum table must be 
              tied to a valid user ID. Then you hire Joe Novice 
              to write some admin pages. Joe writes a delete-user
              page that doesn't bother to check whether or not the 
              deletion will result in an orphaned discussion forum 
              posting. Oracle will check, though, and abort
              any transaction that would result in you having 
              a discussion forum posting by a deleted user. 
Isolation 
              The results of a transaction are invisible to other 
              transactions until the transaction is complete. 
              For example, suppose you have a page to show new
              users and their photographs. This page is coded in 
              reliance on the publisher's directive that there 
              will be a mugshot for every user and will present a
              broken image if there is not. Jane Newuser is 
              registering at your site at the same time that Bill 
              Olduser is viewing the new user page. The script
              processing Jane's registration does inserts into 
              several tables: users, mugshots, users_demographics. 
              This may take some time if Jane's mugshot
              is large. If Bill's query starts before Jane's 
              transaction commits, Bill won't see Jane at all 
              on his new-users page, even if Jane's insertion 
              into some of the tables is complete. 
Durability 
              Once committed (completed), the results of a 
              transaction are permanent and survive future 
              system and media failures. Suppose your ecommerce
              system inserts an order from a customer into a 
              database table and then instructs CyberCash to 
              bill the customer $500. A millisecond later, 
              before your server has heard back from CyberCash, 
              someone trips over the machine's power cord. 
              Oracle will not have forgotten about the new order. 
              Furthermore, if a programmer spills coffee into a 
              disk drive, it will be possible to install a new 
              disk and recover the transactions up to the coffee 
              spill, showing that you tried to bill someone for 
              $500 and still aren't sure what happened over at 
              CyberCash. 

-- 
Mike Slack
[EMAIL PROTECTED]
http://www.aworldthatworks.com/
--
"If we knew what it was we were doing, it wouldn't
be called research, would it?" --Albert Einstein

Reply via email to