0% found this document useful (0 votes)
4 views1 page

4 Explain Timestamping Methods

Timestamping methods involve assigning unique identifiers to transactions to manage concurrency by prioritizing older transactions during conflicts. Each data item also has timestamps to track the last read and write operations, with specific rules governing read and write operations based on these timestamps. Serializability ensures that the execution of concurrent transactions maintains database consistency by equating it to a serial execution of transactions.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

4 Explain Timestamping Methods

Timestamping methods involve assigning unique identifiers to transactions to manage concurrency by prioritizing older transactions during conflicts. Each data item also has timestamps to track the last read and write operations, with specific rules governing read and write operations based on these timestamps. Serializability ensures that the execution of concurrent transactions maintains database consistency by equating it to a serial execution of transactions.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

4Q.

Explain Timestamping Methods:


1. Timestamp A unique identifier created by the DBMS that indicates the relative starting
time of a transaction.
2. Timestamping A concurrency control protocol that orders transactions in such a way that
older transactions, transactions with smaller timestamps, get priority in the event of conflict.
3. if a transaction attempts to read or write a data item, then the read or write is only
allowed to proceed if the last update on that data item was carried out by an older
transaction. Otherwise, the transaction requesting the read/ write is restarted and given a
new timestamp. New timestamps must be assigned to restarted transactions to prevent their
being continually aborted and restarted.
4. In addition to timestamps for transactions, there are timestamps for data items. Each data
item contains a read_timestamp, giving the timestamp of the last transaction to read the
item, and a write_timestamp, giving the timestamp of the last transaction to write (update)
the item.
timestamp ordering protocol works as follows:
If a transaction Ti issues a read(X) operation
If TS(Ti) < W-timestamp(X)
Operation rejected.
If TS(Ti) >= W-timestamp(X)
Operation executed.
All data-item timestamps updated.
If a transaction Ti issues a write(X) operation −
If TS(Ti) < R-timestamp(X)
Operation rejected.
If TS(Ti) < W-timestamp(X)
Operation rejected and Ti rolled back.
Otherwise, operation executed.
----------------------------------------------------------------------------------------------------------------------------------------
5Q. Explain Serializability
Serializability is the concept in a transaction that helps to identify which non-serial schedule
is correct and will maintain the database consistency. It relates to the isolation property of
transaction in the database.
Serializability is the concurrency scheme where the execution of concurrent transactions is
equivalent to the transactions which execute serially.
Serializable Schedule
A serial schedule is always a serializable schedule because any transaction only starts its
execution when another transaction has already completed its execution. However, a non-
serial schedule of transactions needs to be checked for Serializability.

You might also like