Need some help with someone who knows DBMS?

sid_19840

International Coach
Joined
Jun 28, 2005
Location
Kolkata,India
Online Cricket Games Owned
Im sure that there is someone here who know's DBMS.Im really confused with this entry in wikipedia,mainly about conflict and view serializability.Could someone please explain what this mean's.Thanks in advance.

This is taken from this link.

http://en.wikipedia.org/wiki/Schedule_(computer_science)#Conflict_Serializable

Code:
Conflict equivalence

The schedules T1 and T2 are said to be conflict-equivalent if the following conditions are satisfied:

   1. Both schedules T1 and T2 involve the same set of actions in the same set of transactions. (informally speaking, both schedules are containing and working on the same thing)
   2. The order of each pair of conflicting actions in T1 and T2 are the same.

Code:
View equivalence

Two schedules S1 and S2 are said to be view-equivalent when the following conditions are satisfied:

   1. If the transaction Ti in S1 reads an initial value for object X, so does the transaction Ti in S2.
   2. If the transaction Ti in S1 reads the value written by transaction Tj in S1 for object X, so does the transaction Ti in S2.
   3. If the transaction Ti in S1 is the final transaction to write the value for an object X, so does the transaction Ti in S2.
 
Databases aren't my forte, but I'll give it a go.

Conflict equivalence I can't really explain any better than the Wikipedia states.Let me know if you are still stuck on this one.

Conflict-serializable is to do with the order that the transactions are carried out. Bear in mind that a value in the database is only modified on the commit transaction command, but the value is actually read from the database when the read command is executed.

In the example given:

T1 reads value A
T2 reads value A

(I assume that the T1 procedure is using the value it has just read to determine value B)

T1 writes value B
T2 writes value A.

So, a potential problem is that value A is now different in the database. i.e. It is not the value that Transaction 1 was using for its calculations, as T1 has already read the value before T2 changed it.
 
FishBowlMan said:
Databases aren't my forte, but I'll give it a go.

Conflict equivalence I can't really explain any better than the Wikipedia states.Let me know if you are still stuck on this one.

Conflict-serializable is to do with the order that the transactions are carried out. Bear in mind that a value in the database is only modified on the commit transaction command, but the value is actually read from the database when the read command is executed.

In the example given:

T1 reads value A
T2 reads value A

(I assume that the T1 procedure is using the value it has just read to determine value B)

T1 writes value B
T2 writes value A.

So, a potential problem is that value A is now different in the database. i.e. It is not the value that Transaction 1 was using for its calculations, as T1 has already read the value before T2 changed it.


ok.I understand it slightly better(the confict area i.e).But they say that.

Code:
 1. Both schedules T1 and T2 involve the same set of actions in the same set of transactions. (informally speaking, both schedules are containing and working on the same thing)

But in the example for T1,it contains A(i.e it reads A) but it writes value B.So isnt are working on different things?
 
The example they give, i.e. the one you have quoted there, is for conflict-serializable, and not for conflict-equivalence, which is the rule you have quoted.
 

Users who are viewing this thread

Top