Consider a relaxation of two-phase locks in which read only transactions can release read locks early. Would a read only transaction have consistent retrievals? Would the objects become inconsistent? Illustrate your answer with the following transactions T and U at the server

T: x = read (i); y= read(j);

U: write(i, 55);write(j, 66);

in which initial values of ai and aj are 10 and 20.


There is no guarantee of consistent retrievals because overlapping transactions can alter the objects after they are unlocked.

The database does not become inconsistent.





In the above example T is read only and conflicts with U in access to ai and aj. ai is accessed by T before U and aj by U before T. The interleavings are not serially equivalent. The values observed by T are x=10, y= 66, and the values of the objects at the end are ai=55, aj= 66.



Serial executions give either (T before U) x=10, y=20, ai=55, aj=66; or (U before T) x=55, y=66, ai=55, aj=66). This confirms that retrievals are inconsistent but that the database does not become inconsistent.

Computer Science & Information Technology

You might also like to view...

The statement executes until its loop-continuation condition becomes false.

a) while b) until c) loop d) whileTrue

Computer Science & Information Technology

A(n) ____ object is a temporary cache storage for data retrieved from a data source.

A. Data Source B. Cache C. Database D. DataSet

Computer Science & Information Technology

The________ symbol represents a decision point in a flow chart

Fill in the blank(s) with correct word

Computer Science & Information Technology

Locality of __________ has a profound influence on both the organization of memory and on operating system memory management software.

A. instruction B. reference C. hierarchy D. access

Computer Science & Information Technology