Skip to main content

Posts

Showing posts from March, 2014

Transaction Anamolies

Dirty  reads occur when: Transaction A inserts a row into a table. Transaction B reads the new row. Transaction A rolls back. Transaction B may have done work to the system based on the row inserted by transaction A, but that row never became a permanent part of the database. Nonrepeatable  reads occur when: Transaction A reads a row. Transaction B changes the row. Transaction A reads the same row a second time and gets the new results. Phantom  reads occur when: Transaction A reads all rows that satisfy a WHERE clause on an SQL query. Transaction B inserts an additional row that satisfies the WHERE clause. Transaction A re-evaluates the WHERE condition and picks up the additional row.