Databases Reference
In-Depth Information
The upper components of the diagram read as follows:
(i) The box in the upper left-hand corner of the diagram
indicates what time it is now, in the example.
(ii) The row of vertical bars represents a timeline. Each vertical
bar on that timeline represents one month. The month
which is current, in the context of each example, is marked
by filling in its vertical bar. This is a graphical representa-
tion of the same information provided in the clock tick box.
(iii) The open-ended rectangle located below the clock tick box
and directly above the January 2010 bar indicates the effec-
tive time period of the single version of the policy object,
P861. Rectangles which are open-ended will be used to rep-
resent versions with unknown end dates. As we will see in
later diagrams, as soon as the end date for a version is
known, the rectangle will be closed.
Basic Versioning
IT professionals have been using version tables for at least a
quarter-century, when they want to keep track of changes that
would otherwise be lost because of updating by overwriting data.
The simplest versioning method is to add a date to the primary
key of the table to be versioned, thus transforming it from a
non-temporal into a uni-temporal table, i.e. into a table with
one temporal dimension. This is the method we call basic
versioning.
An Insert Transaction
Figure 4.1 shows the results of applying the same insert trans-
action to each table. In both cases, that result is a single row, as
shown. An open-ended rectangle is situated directly above Janu-
ary 2010. This marks the start of the time period during which
policy P861 is represented in the basic version table.
After the insert, the rectangle extends through to the end of
the current month even though, on the date of the insert, we
are at the beginning of that month, not at its end. This is because
we are using a clock that ticks once a month and so that transac-
tion, once applied, will remain in the database for at least that
one month. Thus, our concept of a clock tick is a logical concept,
not a physical one.
There is no upper limit to the length of a clock tick. The lower
limit is the granularity of a full machine timestamp, as accessible
by the DBMS. It is what we called, in the previous chapter, an
 
Search WWH ::




Custom Search