What's the definition of timestamp?
The timestamp is just for a transaction? (no matter what actions are in the transaction. The timestamp is always the time when the transaction happened).
OR the timestamp is for each action of a transaction? (each action has a timestamp.)
T1 | R1(X) R1(X)
T2 | R2(Y) R2(Y) W2(X)
T3 | W3(Y)
For instance, when the first R1(X) happened, it has a timestamp TS. But for the second R1(X), the timestamp is same as the TS? OR the timestamp has changed?
For another example, if I have R1(X)W2(X)W1(X), is it view serializable? and is it conflict serializable?
Best Answer
Assuming that you are referring to informal timestamp-based concurrency control, Wikipedia has a pretty good explanation, that should answer your question about the definition of timestamps and use for transactions and actions (or objects). Here is an excerpt (see the actual page for more details):
Source: Wikipedia - Timestamp-based concurrency control
In addition to the above explanation, CSE 513: Distributed Systems (Concurrency Control) is a pretty well explained, and easy to follow, PDF. It has the same information, explained in a slightly different way, and covers Serialization. There is too much information to reproduce it here, unfortunately.
Hope that helps. Good Luck!