Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider two tables R(A,B) and S(C). Below are pairs of transactions. For each p

ID: 3842830 • Letter: C

Question

Consider two tables R(A,B) and S(C). Below are pairs of transactions. For each pair, decide whether it is possible for nonserializable behavior to be exhibited when executing the transactions concurrently, while respecting their specified isolation levels. Assume individual statements are executed atomically, and each transaction executes to completion.

(a) Transaction 1:

    Set Transaction Isolation Level Read Committed;

    Select count(*) From R;

    Select count(*) From S;

    Commit;

    Transaction 2:

    Set Transaction Isolation Level Serializable;

    Insert Into R Values (1,2);

    Insert Into S Values (3);

    Commit;


    (b) Transaction 1:

    Set Transaction Isolation Level Read Committed;

    Select count(*) From R;

    Select count(*) From S;

    Commit;

    Transaction 2:

    Set Transaction Isolation Level Serializable;

    Insert Into R Values (1,2);

    Insert Into R Values (3,4);

    Commit;


    (c) Transaction 1:

    Set Transaction Isolation Level Repeatable Read;

    Select count(*) From R;

    Select count(*) From S;

    Select count(*) From R;

    Commit;

    Transaction 2:

    Set Transaction Isolation Level Serializable;

    Insert Into R Values (1,2);

    Commit;

Explanation / Answer

a) Yes, nonserializable behaviour is possible for this as first the statements from the transaction 1 is executed and then the statements in transaction 2 wil be executed.

b) No, nonserializable behaviour is not possible because here in transaction 2 only R values is being updated but the the result of second statement in transaction 1 which is belongs to relation S is same before and after the execution of transaction 2.

c) Yes, nonserializable behaviour is possible in this first and third statements of the transaction 1 is executed before the transaction 2 and after the transaction 2 as well , respectively.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote