shuijian-xu / hive

0 stars 0 forks source link

VALID TIME AND TRANSACTION TIME? #84

Open shuijian-xu opened 5 years ago

shuijian-xu commented 5 years ago

The valid time associated with the value of, say, an attribute is the time when the value is true in modeled reality.

The transaction time associated with the value of, say, an attribute records the time at which the value was stored in the database and is able to be retrieved.

shuijian-xu commented 5 years ago

For instance, the valid time of an order is the time that the order was taken. Such values may be associated with:

  1. A single instant. Defined to be a time point on an underlying time axis. An event is defined as an instantaneous fact that occurs at an instant.

  2. Intervals (periods) of time. Defined to be the time between two instants.

The valid time is normally supplied by the user, although in some cases, such as telephone calls, the valid time can be provided by the recording equipment.

shuijian-xu commented 5 years ago

Transaction times are system generated and may be implemented using transaction commit times. Transaction times may also be represented by single instants or time intervals. Clearly, a transaction time can provide only an approximation of the valid time. We can say, generally, that the transaction time that records an event will never be earlier than the true valid time of the same event.

shuijian-xu commented 5 years ago

The frequency of capture for the fact data is usually as close as possible to the granularity of the valid time event. For instance, in the Wine Club example, the granularity of time of a sale is “day” and the sales are captured into the data warehouse on a daily basis. There are exceptions, such as telecommunications where the granularity of time is “seconds” but the frequency of capture is, typically, still daily. Nevertheless, the time assigned to the fact can usually be regarded as the valid time.