Schedule, as the name suggests, is a process of lining the transactions and executing them one by one. When there are multiple transactions that are running in a concurrent manner and the order of operation is needed to be set so that the operations do not overlap each other, Scheduling is brought into play and the transactions are timed accordingly. The basics of Transactions and Schedules is discussed in Concurrency Control (Introduction), and Transaction Isolation Levels in DBMS articles. Here we will discuss various types of schedules.
Note: It can be seen that:
The relation between various types of schedules can be depicted as:
Example: Consider the following schedule:
S : R1(A), W2(A), Commit2, W1(A), W3(A), Commit3, Commit1
Which of the following is true?
(a) The schedule is view serializable schedule and strict recoverable schedule
(b) The schedule is non-serializable schedule and strict recoverable schedule
(c) The schedule is non-serializable schedule and is not strict recoverable schedule.
(d) The Schedule is serializable schedule and is not strict recoverable schedule
Ans: (d)
Solution: The schedule can be re-written as:-
First of all, it is a view serializable schedule as it has view equal serial schedule T1 → T2 → T3 which satisfies the initial and updated reads and final write on variable A which is required for view serializability. Now we can see there is write – write pair done by transactions T1 followed by T3 which is violating the above-mentioned condition of strict schedules as T3 is supposed to do write operation only after T1 commits which is violated in the given schedule. Hence the given schedule is serializable but not strict recoverable. So, option (d) is correct.
62 videos|66 docs|35 tests
|
1. What are the different types of schedules in DBMS? |
2. What is a serial schedule in DBMS? |
3. What is a concurrent schedule in DBMS? |
4. What are the advantages of concurrent schedules in DBMS? |
5. What are the challenges or issues associated with concurrent schedules in DBMS? |
|
Explore Courses for Computer Science Engineering (CSE) exam
|