Concurrent Operations in Databases

Database transaction: http://maxdb.sap.com/doc/7_7/81/74b30edc2142658e510080ef6917f1/ppt_img.gif

Database :

DataBase V/S FileSystem

we are focusing on Concurrent Operations :

What are these Anomalies :

Using Database :

This will ensure that consistency is maintained as each operation is moves the data to consistent state and 2 executions are not interfering with each other at all.
This helps executions to make changes to 2 separate areas but ensure no concurrent changes are happening to same data at same time, so we get some Concurrency while maintaining Consistency.
Here, we give executions to make changes independently, then the decision is just to which data values to agree upon, and that responsibility may be passed to Database(Server side).
This is area of study on How to determine the order of operations, though a simple example of all executions happen one after other will ensure consistency.
Most databases talk about mix of Isolation along with locking as a way to achieve concurrent executions. Isolation is more around having your own copy of data to work upon where based on kind of Isolation, you get different effect of READ and WRITE action.

Understanding these Anomalies better :

T1           T2
W1[X]
W2[X]
C1/A1
C2/A2
T1           T2
W1[X]
R2[X]
C1/A1
C2/A2
T1           T2
R1[X]
W2[X]
C1/A1
C2/A2
T1           T2
R1[X]
W2[X]
W1[X]
C1
C2
T1              T2
R1[X ~= pred]
W2[Y ~= pred]
C1/A1
C2/A2

Caveat : Phantom Reads V/S Non-Repeatable Reads :