Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/lsp4you/public_html/connect.php on line 2
Almost all the commercial DBMS support multi-user environment. Thus, allowing multiple transactions to proceed simultaneously.
The concurrency related problem may occur in databases only if “two transactions are contending for the same data item and at least one of the concurrent transactions wishes to update a data value in the database”. In case, the concurrent transactions only read same data item and no updates are performed on these values, then it does not cause any concurrency related problem.
Consider Transaction T1: Read X Subtract 100 Write X Read Y Add 100 Write Y Consider Transaction T2 : Read X Read Y Display X + Y
If both of these transactions are issued simultaneously, then the execution of these instructions can be mixed in many ways. This is called Schedule.
A schedule is defined as the sequential ordering of the operations of n interleaved transactions. A schedule maintains the order of operations within the individual transaction. In a schedule, two operations of different transactions conflict if they access the same data item and one of them is a write operation.