Assignment-3
Assignment-3
1).Consider the schedule S : R1(A) , R2(A) , R1(B) , R2(B) , R3(B) , W1(A) , W2(B)
Check whether the given schedule is conflict-serializable or not. Explain how.
2).Consider a database with objects X and Y and assume that there are two transactions TI and T2. Transaction TI reads objects
X and Y and then writes object X. Transaction T2 reads objects X and Y and then writes objects X and Y .
1. Give an example schedule with actions of transactions T1 and T2 on objects
X and Y that results in a write-read conflict.
2. Give an example schedule with actions of transactions T1 and T2 on
objects X and Y that results in a read-write conflict.
3. Give an example schedule with actions of transactions T1 and T2 on
objects X and Y that results in a write-write conflict.
What happens to the database system throughput if the number of read-write and read- transactions
is increased?
3).Four transactions T1={Read(a), Write(a), Read(c), Write(c)}; T2={Read(d), Read(c), Write(d), Read(a)
Write(a)}; T3={(Read(c), Read(d), Write(d), Read(b), Write(c), Write(b)}; T4={Read(b), Write(b), Read(d),
Write(d)} are submitted at same time and schedule S is made as (R1(a). W1(a), R3(c), R3(d),
W3(d),R2(d),R2(c),R4(b), W4(b),R1(c),W1(c), R4(d), W4(d),R3(b), W3(c), W3(b),W2(d), R2(a), W2(a))
a)Find the schedule S is serializable or not through precedence graph and justify your answer.
b)Ifit is serializable then find the corresponding seria1schedule(s)
5). Consider a disk with a sector size of 256 bytes, 1000 tracks per surface, 30 sectors per track, five double-sided
platters, and average seek time of 10 msec.
1. What is the capacity of a track in bytes? What is the capacity of each
surface? What is the capacity of the disk? (6 Marks)
2. How many cylinders does the disk have?
3. Give examples of valid block sizes. Is 256 bytes a valid block size? 512? 1048? 2048?
4. If the disk platters rotate at 2800 rpm (revolutions per minute), what is the
maximum rotational delay?
6).Write the working of simple cluster indexing strategy and separate block cluster indexing.
a. Consider the following log consisting transactions T1, T2, and T3:
1. (Start, TI);
2. (Write, TI, P, 500, 600);
3. (Write, TI, Q, 400, 500);
4. (Commit, T1);
Assignment-3 DBMS(D2+TD2)
5. (Start, T2);
6. (Write, T2, P, 600, 550);
7. (Write, T2, Q, 500, 450);
8. (Commit, T2);
9. (Start, T3);
10. (Write, T3, P, 550, 600);
11. (Write, T3, Q, 450, 500);
12. (Commit, T3);
If the schedule crashes just after step 11, then what will be the order of undo and redo
actions, performed during the recovery process?
7).Citing a suitable example, differentiate between deferred and immediate
database
modification techniques.