CS
Database-20-TransactionProcessing.pptx

Definition of serializability based on view

Info icon This preview shows pages 37–43. Sign up to view the full content.

Definition of serializability based on view equivalence. A schedule is view serializable if it is view equivalent to a serial schedule. Transaction Processing 37
Image of page 37

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Characterizing Schedules Based on Serializability Two schedules are said to be view equivalent if the following three conditions hold: 1. The same set of transactions participates in S and S’, and S and S’ include the same operations of those transactions. 2. For any operation Ri(X) of Ti in S, if the value of X read by the operation has been written by an operation Wj(X) of Tj (or if it is the original value of X before the schedule started), the same condition must hold for the value of X read by operation Ri(X) of Ti in S’. 3. If the operation Wk(Y) of Tk is the last operation to write item Y in S, then Wk(Y) of Tk must also be the last operation to write item Y in S’. Transaction Processing 38
Image of page 38
Characterizing Schedules Based on Serializability The premise behind view equivalence: As long as each read operation of a transaction reads the result of the same write operation in both schedules, the write operations of each transaction must produce the same results. The view ”: the read operations are said to see the same view in both schedules. Transaction Processing 39
Image of page 39

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Characterizing Schedules Based on Serializability Relationship between view and conflict equivalence : The two are same under constrained write assumption which assumes that if T writes X, it is constrained by the value of X it read; i.e., new X = f(old X) Conflict serializability is stricter than view serializability. With unconstrained write (or blind write), a schedule that is view serializable is not necessarily conflict serializable. Any conflict serializable schedule is also view serializable, but not vice versa. Transaction Processing 40
Image of page 40
Characterizing Schedules Based on Serializability Relationship between view and conflict equivalence (cont): Consider the following schedule of three transactions T1: r1(X), w1(X); T2: w2(X); and T3: w3(X): Schedule Sa: r1(X); w2(X); w1(X); w3(X); c1; c2; c3; In Sa, the operations w2(X) and w3(X) are blind writes, since T1 and T3 do not read the value of X. Sa is view serializable, since it is view equivalent to the serial schedule T1, T2, T3. However, Sa is not conflict serializable, since it is not conflict equivalent to any serial schedule. Transaction Processing 41
Image of page 41

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Characterizing Schedules Based on Serializability Testing for conflict serializability: Algorithm 21.1: Looks at only read_Item (X) and write_Item (X) operations Constructs a precedence graph (serialization graph) - a graph with directed edges An edge is created from Ti to Tj if one of the operations in Ti appears before a conflicting operation in Tj The schedule is serializable if and only if the precedence graph has no cycles.
Image of page 42
Image of page 43
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '09
  • SUNANHAN

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern