ArticleslgStudy

science

Read–write conflict

Read–write conflict is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Read–write conflict rather than just read about it. In short: In computer science, in the field of databases, read–write conflict, also known as unrepeatable reads, is a computational anomaly associated with interleaved execution of transactions. Specifically, a read–write conflict occurs when a "transaction requests to read an entity for which an unclosed transaction has already made a write request." Given a schedule S S = [ T 1 T 2 R ( A ) R ( A ) W ( A ) C o m .

Key takeaways

  • Read–write conflict belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Read–write conflict to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Read–write conflict from memory before moving on to harder problems.

Reference excerpt

In computer science, in the field of databases, read–write conflict, also known as unrepeatable reads, is a computational anomaly associated with interleaved execution of transactions. Specifically, a read–write conflict occurs when a "transaction requests to read an entity for which an unclosed transaction has already made a write request." Given a schedule S

S = [ T 1 T 2 R ( A ) R ( A ) W ( A ) C o m . R ( A ) W ( A ) C o m . ] {\displaystyle S={\begin{bmatrix}T1&T2\\R(A)&\\&R(A)\\&W(A)\\&Com.\\R(A)&\\W(A)&\\Com.&\end{bmatrix}}}

In this example, T1 has read the original value of A, and is waiting for T2 to finish. T2 also reads the original value of A, overwrites A, and commits. However, when T1 reads from A, it discovers two different versions of A, and T1 would be forced to abort, because T1 would not know what to do. This is an unrepeatable read. This could never occur in a serial schedule, in which each transaction executes in its entirety before another begins. Strict two-phase locking (Strict 2PL) or Serializable Snapshot Isolation (SSI) prevent this conflict.

Real-world example Alice and Bob are using a website to book tickets for a specific show. Only one ticket is left for the specific show. Alice signs on first to see that only one ticket is left, and finds it expensive. Alice takes time to decide. Bob signs on and also finds one ticket left, and orders it instantly. Bob purchases and logs off. Alice decides to buy a ticket, to find there are no tickets. This is a typical read–write conflict situation.

See also Concurrency control Write–read conflict Write–write conflict

References

Worked examples

Example 1 — a first encounter with Read–write conflict

Start with the simplest possible case. Write down what Read–write conflict claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Read–write conflict before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Read–write conflict ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Read–write conflict

In research
Read–write conflict appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Read–write conflict in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Read–write conflict is common in secondary-school and first-year university syllabi. It links to neighbouring topics Data management, Transaction processing, so understanding it makes those chapters shorter.
In everyday life
Look for Read–write conflict outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Read–write conflict” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Read–write conflict in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Read–write conflict means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Read–write conflict out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Read–write conflict in simple terms?

In computer science, in the field of databases, read–write conflict, also known as unrepeatable reads, is a computational anomaly associated with interleaved execution of transactions. Specifically, a read–write conflict occurs when a "transaction requests to read an entity for which an unclosed tr…

Why does Read–write conflict matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Read–write conflict?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Read–write conflict.

Tags

  • Data management
  • Transaction processing

Keep exploring