|
问一道sql transaction的题,老师给的课件英文的怎么看也不太懂,或者大家有推荐的博客或文章讲这一部分的也行,谢谢了各位
An IT company developed a new database system to record the statics data of the coming Opera House Open Day including the number of reservations X, remaining gifts Y and meals ordered Z. Here is a schedule of three transactions:
S1, R1(X), S2, R2(Y), W1(X), E1, R3(X), A, W2(Y), E2, R3(Y), B, W3(Y), W3(X), E3
Where Si indicates the start point of transaction i, Ei indicates the end point of transaction i, Ri(X) indicates a read operation in transaction i on a variable X, and Wi(X) indicates a write operation in transaction i on a variable Y.
Answer the following questions and justify your answers.
1) Assume that the system crashes at B, what should be done to recover the system?
2) Assume a checkpoint is made at point A, what should be done to the three transactions when the crash happens at B?
3) Is the transaction schedule conflict serializable?
4) Construct a schedule (may not be the same as above) of these three transactions which causes deadlock when using two-phase locking protocol. If no such schedule exists, explain why.
谢谢各位
|
|