Changes

Jump to navigation Jump to search
395 bytes added ,  13:00, December 22, 2009
no edit summary
Line 7: Line 7:  
== Transactions ==
 
== Transactions ==
   −
A transaction may include several SQL statements, but the statements are processed in an all-or-nothing fashion. The transaction represents logical work like a customer purchasing a product. For example, the statements may include adding the purchase price to the customer's account, and subtracting the product from inventory. If either statement is executed, they must both be executed, and if either statement is aborted, they must both be aborted. This is achieved by using the COMMIT statement and the ROLLBACK statement. Once all of the statements to execute for the current transaction have been entered, the COMMIT statement is entered, and the transaction is committed to the database. If any of the statements in the transaction cannot be completed, the entire transaction is rolled back, and none of the statements take effect.
+
A transaction may include several SQL statements, and the sequence of statements are executed [[atomically]]. The transaction represents a logical unit work such as a customer purchasing a product. For example, the statements may include adding the purchase price to the customer's account, and subtracting the product from inventory. If either statement is executed, they must both be executed, and if either statement is aborted, they must both be aborted. This is achieved by using the COMMIT statement and the ROLLBACK statement. Once all of the statements to execute for the current transaction have been entered, the COMMIT statement is entered, and the transaction is committed to the database. If any of the statements in the transaction cannot be completed, the entire transaction is rolled back, and none of the statements take effect.
 +
 
 +
Transactions exhibit their own properties such as an [[isolation level]]. The transaction [[isolation level]] determines the level of interactivity with other concurrently running transactions. By default each transaction is conceptually isolated from all other transactions, thereby preventing two (or more) transactions from concurrently reading and/or updating the same data records.
    
==References==
 
==References==
27

edits

Navigation menu