7
$\begingroup$

In database transactions theory, what is the difference between a strict schedule and a schedule that is merely secured against cascade aborts?

Could you give an example of a schedule that is secured against cascade aborts but is not strict?

I found these slides that give definitions but it's still not clear to me where is the difference (they just seem differently worded).

$\endgroup$

3 Answers 3

6
$\begingroup$

On a cascadeless schedule a transaction $T_2$ cannot read a value $a$ if a transaction $T_1$ wrote $a$ before that and didn't commit. On a strict schedule $T_2$ also wouldn't be able to write $a$ after $T_1$ wrote it (even if it read $a$ before $T_1$ wrote it).

If you read carefully, the definition of strict says "not read or overwritten". That's the difference.

I reproduce here an example of cascadeless but not strict schedule, from the Wikipedia page on the subject:

enter image description here

$\endgroup$
2
  • $\begingroup$ So blind writes are acceptable in Cascade-less schedule, right? $\endgroup$
    – The Room
    Nov 8, 2018 at 4:52
  • $\begingroup$ It will not cause cascading aborts, so yes. $\endgroup$ Nov 8, 2018 at 5:46
2
$\begingroup$

Definitions from the books by Korth et. al. and Elmasri et al.:

Cascadeless schedule
A cascadeless schedule is one where, for each pair of transactions Ti and Tj such that Tj reads a data item previously written by Ti , the commit operation of Ti appears before the read operation of Tj .

Strict schedule
If in the given schedule, each transaction Tj neither reads nor writes any data item ‘x’ until the last transaction Ti that has written ‘X’ is committed or aborted then it is strict.

Notice:

  • Definition of cascadeless schedule only puts restriction on where in the schedule the reads of transaction Tj can appear.
  • Definition of strict schedule only puts restriction on where in the schedule the reads and write of transaction Tj can appear.

Thus following schedule is allowed under cascadelessness definition but not under definition of strict schedule:

| T1       | T2       |
|----------|----------|
| write(x) |          |
|          | write(x) |
|          | commit   |
| read(x)  |          |

as write(x) of T1 appears before commit of T2. Evidently cascadeless schedule can contain blind writes !!!

$\endgroup$
1
$\begingroup$

Lets say T1 and T2 are two transactions. T1 is scheduled first and T2 next. Assume they gonna read a variable a

Now lets see how it works.

Cascadeless schedule:

T2 can read a only after commit action from T1. But some transaction write and read. T2 can write a before commit action from T1

enter image description here enter image description here

now lets look what is strict schedule:

Strict schedule: T2 can read and write a only after commit action from T1.

enter image description here

$\endgroup$
1
  • $\begingroup$ Welcome to Computer Science! Note that you can use LaTeX here to typeset mathematics in a more readable way. See here for a short introduction. Alternatively you may consider formatting like Mahesha999 did, textually. Thank you. $\endgroup$
    – Evil
    Dec 8, 2016 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.