Week2 - Wednesday

Week2 - Wednesday - Waqas Javed 982800 Exercise 20.1...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Waqas Javed 982800 Exercise 20.1 Transaction is an action, or series of actions, carried out by a single user or application program, which reads or updates the contents of the database. A transaction is a logical unit of work on the database. It may be an entire program, a part of a program, or a dingle command, and it may involve any number of operations on the database. Exercise 20.2 Following are the three problems are occurred when concurrency in databases is allowed. Lost update problem An apparently successfully completed updated operation by one user can be overridden by another user. This is known as the lost update problem. Example: T a and T b are the concurrent transactions. Transaction T a is depositing some amount and T b is withdrawing some amount concurrently. Time T a T b Balance (X) T1 Begin Transaction 100 T2 Begin Transaction Read X 100 T3 Read X X = X + 50 100 T4 X = X – 10 Write X 150 T5 Write X Commit 90 T6 Commit 90 T b is depositing 50 in account and updating the amount. T a is withdrawing form the old amount and updating the amount while overriding the T b ’s amount. Uncommitted dependency problem The uncommitted dependency problem occurs when one transaction is allowed to see the intermediate results of another transaction before it has committed.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
It is also called dirty read problem. Here T4 is depositing some amount and mean while another transaction t3 reads the amount. When t3 is working on the amount, t4 rollback the transaction. Now T3
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/13/2010 for the course COMPRO CS401 taught by Professor Just during the Spring '10 term at Maharishi.

Page1 / 5

Week2 - Wednesday - Waqas Javed 982800 Exercise 20.1...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online