encyclopegia.org

Precedence graph

A precedence graph, also named conflict graph and serializability graph, is used in the context of concurrency control in databases.[src] It is the directed graph representing precedence of transactions in the schedule, as reflected by precedence of conflicting operations in the transactions.[src] A schedule is conflict-serializable if and only if its precedence graph of committed transactions is acyclic.[src] The precedence graph for a schedule S contains: * A node for each committed transaction in S * An arc from T i to T j if an action of T i precedes and conflicts with one of T j 's actions.[src] That is the actions belong to different transactions, at least one of the actions is a write operation, and the actions access the same object (read or write).[src] Cycles of committed transactions can be prevented by aborting an undecided (neither committed, nor aborted) transaction on each cycle in the precedence graph of all the transactions, which can otherwise turn into a cycle of committed transactions (and a committed transaction cannot be aborted).[src] One transaction aborted per cycle is both required and sufficient in number to break and eliminate the cycle (more aborts are possible, and can happen under some mechanisms, but are unnecessary for serializability).…[src]

A precedence graph, also named conflict graph and serializability graph, is used in the context of concurrency control in databases.[src] It is the directed graph representing precedence of transactions in the schedule, as reflected by precedence of conflicting operations in the transactions.[src] A schedule is conflict-serializable if and only if its precedence graph of committed transactions is acyclic.[src] The precedence graph for a schedule S contains: A node for each committed transaction in S An arc from T i to T j if an action of T i precedes and conflicts with one of T j 's actions.[src] That is the actions belong to different transactions, at least one of the actions is a write operation, and the actions access the same object (read or write).[src] Cycles of committed transactions can be prevented by aborting an undecided (neither committed, nor aborted) transaction on each cycle in the precedence graph of all the transactions, which can otherwise turn into a cycle of committed transactions (and a committed transaction cannot be aborted).[src] One transaction aborted per cycle is both required and sufficient in number to break and eliminate the cycle (more aborts are possible, and can happen under some mechanisms, but are unnecessary for serializability).[src] The probability of cycle generation is typically low, but, nevertheless, such a situation is carefully handled, typically with a considerable amount of overhead, since correctness is involved.[src] Transactions aborted due to serializability violation prevention are restarted and executed again immediately.[src] ==Precedence graph examples== ===Example 1=== S = \begin{bmatrix} T1 & T2 \\ R(A) & R(A) \\ A=A*5 & R(B) \\ W(A) & B=B+A \\ R(B) & W(B) \\ B=B*10 & \\ W(B) & \\ \end{bmatrix} ===Example 2=== D = R1(A) R2(B) W2(A) Com.2 W1(A) Com.1 W3(A) Com.3 A precedence graph of the schedule D, with 3 transactions.[src] As there is a cycle (of length 2; with two edges) through the committed transactions T1 and T2, this schedule (history) is not Conflict serializable.[src] Notice, that the commit of Transaction 2 does not have any meaning regarding the creation of a precedence graph.[src] S = \begin{bmatrix} T1 & T2 & T3 \\ R(A) & & \\ & W(A) & \\ & Com.[src] & \\ W(A) & & \\ Com.[src] & & \\ & & W(A)\\ & & Com.\\ \end{bmatrix} or S = R1(A) W2(A) Com.2 W1(A) Com.1 W3(A) Com.3 For each transaction T x participating in schedule S, create a node labeled T i in the precedence graph.[src] Thus the precedence graph contains T 1 , T 2 , T 3 .[src] For each case in S where T j executes a read_item(X) after T i executes a write_item(X), create an edge (T i → T j ) in the precedence graph.[src] This occurs nowhere in the above example, as there is no read after write.[src] For each case in S where T j executes a write_item(X) after T i executes a read_item(X), create an edge (T i → T j ) in the precedence graph.[src] This results in a directed edge from T 1 to T 2 (as T 1 has R(A) before T 2 having W(A)).[src] For each case in S where T j executes a write_item(X) after T i executes a write_item(X), create an edge (T i → T j ) in the precedence graph.[src] This results in directed edges from T 2 to T 1 , T 2 to T 3 and T 1 to T 3 .[src] The schedule S is serializable if and only if the precedence graph has no cycles.[src] As T 1 and T 2 constitute a cycle, the above example is not (conflict) serializable.[src] ==References== ==External links== The Fundamentals of Database Systems, 5th Edition the use of precedence graphs is discussed in chapter 17, as they relate to tests for conflict serializability.[src] Abraham Silberschatz, Henry Korth, and S.[src] Sudarshan.[src] 2005.[src] Database System Concepts (5 ed.), PP.[src] 628–630.[src] McGraw-Hill, Inc., New York, NY, USA.[src] el:Γράφος Σειριοποιησιμότητας ru:Граф предшествования[src]

39 sentences · 39 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Precedence graph." encyclopegia.org, 2026, https://encyclopegia.org/wiki/precedence-graph. Accessed 30 November 2026.

Chicago

"Precedence graph." encyclopegia.org. Accessed November 30, 2026. https://encyclopegia.org/wiki/precedence-graph.

APA

encyclopegia.org. (2026). Precedence graph. Retrieved November 30, 2026, from https://encyclopegia.org/wiki/precedence-graph

Accessed November 30, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

graph of a function

stub · references available

Turán graph

stub · references available

graph property

stub · references available

precedence diagram method

stub · references available

Goslar Precedence Dispute

stub · references available

Graph Modelling Language

stub · references available

vertex-weighted graph

stub · references available

weighted graph

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1369347168 · 0.5 · snapshot enwiki-001369347168

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.