6
$\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$
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$
  • $\begingroup$ So blind writes are acceptable in Cascade-less schedule, right? $\endgroup$ – The Room Nov 8 '18 at 4:52
  • $\begingroup$ It will not cause cascading aborts, so yes. $\endgroup$ – André Souza Lemos Nov 8 '18 at 5:46
1
$\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$
0
$\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$
  • $\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 '16 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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