vault backup: 2024-02-06 16:37:16
This commit is contained in:
@@ -26,4 +26,41 @@ This would be avoided by preventing reads of targeted tuples until the first tra
|
||||
- Two operations conflict if all of these are true:
|
||||
- Belong to different transactions
|
||||
- Access same data item
|
||||
- At least on writes the item
|
||||
- At least one writes the item
|
||||
|
||||
# Exercises
|
||||
|
||||
1. What is meant by the term Concurrency Control
|
||||
Process of managing simultaneous operations on the database without interference.
|
||||
|
||||
2. Why is concurrency control needed?
|
||||
Concurrency control is needed to properly ensure database integrity and consistency. If we don't use concurrency control, data may be overwritten, or values may not be correct during tuple updates.
|
||||
|
||||
3. A major objective in developing a database is to enable many users to access shared data concurrently. Explain why concurrent access needs to be carefully managed when two or more users are accessing the database simultaneously and at least one is updating data.
|
||||
Since one person is updating data, the operation may be conflicting if another person tries to access the value of the data, depending on the time at which the operations coincide.
|
||||
|
||||
4. Illustrate your answer using the example of an on-line railway seat reservation system. Assume that the railway seat reservation system must ensure that a particular seat on a particular train journey is not reserved by more than one passenger.
|
||||
If person A tries to purchase a seat on a train, and person B tries to check if a seat is available at the same time, person B will be able to book the same seat if both operations are concurrent.
|
||||
|
||||
5. Which component of the DBMS takes responsibility for the isolation property of database transactions?
|
||||
Concurrency Control
|
||||
|
||||
6. Name the three most common concurrent transaction execution problems.
|
||||
Lost Update
|
||||
Uncommitted Dependency
|
||||
Inconsistent Analysis
|
||||
|
||||
7. Under what circumstances do two operations in a schedule conflict?
|
||||
Belong to different transactions
|
||||
Access same data item
|
||||
At least one writes the item
|
||||
|
||||
8. Identify all of the pairs of operations which conflict in each of the schedules shown in Table 26.1.
|
||||
T1 and T2 conflict as T2 writes data before T1 has completed.
|
||||
( 6 conflicts )
|
||||
T1 and T2 conflict as T1's write operation is overwritten by T2's write operation before either transaction is complete.
|
||||
( 2 conficts )
|
||||
T1 and T2 conflict as T1's write for X is overwritten by T2's write for X before either transaction is complete
|
||||
( 2 conflicts )
|
||||
T1 and T2 conflict as T1's write operation is overwritten by T2's write operation before either transaction is complete.
|
||||
( 3 conflicts )
|
||||
|
Reference in New Issue
Block a user