edited by
1,586 views
8 8 votes

Consider concurrent execution of two transactions $T 1$ and $T 2$ in a DBMS, both of which access a data object $A$. For these two transactions to not conflict on $A$, which one of the following statements must be true?

  1. Both $T 1$ and $T 2$ only read $A$
  2. $T 1$ reads $A$ and $T 2$ writes $A$
  3. $T 1$ writes $A$ and $T 2$ reads $A$
  4. Both $T 1$ and $T 2$ write $A$

5 Answers

3 3 votes

Answer: Option A

In a DBMS, two operations on the same data object Q are said to be in conflict if at least one of them is a Write operation.

Conflict Conditions

For two transactions T1 and T2 accessing the same data object Q are said to be in conflict if at least one of them is a Write operation.

  1. Read-Read (R-R): No Conflict. Both transactions are only viewing the data; the state of $Q$ remains unchanged.

  2. Read-Write (R-W): Conflict. One transaction reads while the other updates, leading to potential inconsistency.

  3. Write-Read (W-R): Conflict. Known as a "Dirty Read" if the write hasn't been committed.

  4. Write-Write (W-W): Conflict. Known as a "Blind Write" or "Lost Update" problem.

Therefore, for T1 and T2 to not conflict, the only valid scenario is when both T1 and T2 only read Q.

https://www.geeksforgeeks.org/dbms/concurrency-control-in-dbms/ 


 

0 0 votes

Although I am not a Database Expert But I shall try to Explain in a Simple Trick.

Always Remember : Write is the main culprit. It creates Conflicts.

Then : 

Option B : T1 reads A and T2 writes A  = CONFLICT

Option C : T1 writes A and T2 reads A   = CONFLICT

Option D : Both T1 and T2 write A   = CONFLICT

Hence, 

Option A = Correct

 

 

 

 

0 0 votes

The question says that T1 and T2 accessed data item A. And we want that both the transactions should not conflict with each other while performing any operation on A. And we have to find out at what situation it will be possible that both the transactions will not conflict with each other while perfoming any operation on it.

 

So, conflict can occur through the following pairs :

1. Read-After-Write (Occuring in Option C)

2. Write-After-Read (Occuring in Option B

3. Write-After-Write (Occuring in Option D)  

Only in Read-After-Read pair, conflict is not possible (Occuring in Option A)  

Therefore, the correct option is A.

0 0 votes

There will be no conflict between the transactions if they only read the data; if anyone of it performs write action, the conflict will occur, hence following is the correct answer.

  1. Both T1 and T2 only read A
     
Answer:
Position:
Show:

Related questions

11 11 votes
3 3 answers
1.9k
1.9k views
gatecse asked Feb 23
1,933 views
In the context of DBMS, consider the two sets $\mathbf{T}$ and $\mathbf{S}$ given below.\[\renewcommand{\arraystretch}{1.3}\begin{array}{|l|l|}\hline\quad\quad\quad\textb...
17 17 votes
3 3 answers
2.7k
2.7k views
gatecse asked Feb 23
2,672 views
In the context of schema normalization in relational DBMS, consider a set $\text{F}$ of functional dependencies. The set of all functional dependencies implied by $\text{...
8 8 votes
2 2 answers
1.9k
1.9k views
gatecse asked Feb 23
1,941 views
An index in a DBMS is said to be dense if an index entry appears for every search-key value in the indexed file. Otherwise it is called a sparse index. Consider the follo...
10 10 votes
2 2 answers
3.3k
3.3k views
gatecse asked Feb 23
3,296 views
An unbiased six-faced dice whose faces are marked with numbers $1,2,3,4,5$, and $6$ is rolled twice in succession and the number on the top face is recorded each time. Th...