Questions on Transactions - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Questions on Transactions

Description:

Note that T1 reads a value of y updated by T2, and yet, T1 commits before T2. read(x) ... commit. T1. T2. T3. 6. Question. Is the following schedule serializable? ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 12
Provided by: marily192
Category:

less

Transcript and Presenter's Notes

Title: Questions on Transactions


1
Questions on Transactions
2
  • Question. Is the following schedule conflict
    serializable? Why?

3
  • Answer. Equivalent serial schedule T2, T1, T3

4
  • Question. Can the following schedule be adopted
    by a database?

5
  • Answer. No, because it is not recoverable. Note
    that T1 reads a value of y updated by T2, and
    yet, T1 commits before T2.

6
  • Question. Is the following schedule serializable?
    How about conflict serializable?

7
  • Answer. Is it conflict serializable?
  • No.
  • Is it serializable?
  • Yes. The schedule is equivalent to serial
    schedule T1, T2, T3.
  • Remember

8
  • Question. If T2 aborts at the position shown,
    which transactions need to be rolled back?

9
  • Answer. All of them.

10
  • Question. Why must every schedule be serializable
    and recoverable?
  • Why is a cascadeless schedule usually a good
    idea?
  • Can you give a scenario where a cascadeless
    schedule is not a good idea?

11
  • Why must every schedule be serializable and
    recoverable?
  • Serializability of a schedule makes the result
    predictable and natural it must be equivalent
    to one of the serial schedules.
  • Recoverability ensures that, when failures
    happen, the database state can be brought back to
    a correct state.
  • Why is a cascadeless schedule usually a good
    idea?
  • Because it saves the computing resources which
    would be wasted if the transactions are rolled
    back.
  • Can you give a scenario where a cascadeless
    schedule is not a good idea?
  • A casecadeless schedule typically has a lower
    level of concurrency. If failures are infrequent,
    it would be a good idea to increase concurrency
    by taking the risk of cascading roll backs.
Write a Comment
User Comments (0)
About PowerShow.com