Databases Reference
In-Depth Information
approach is better at tracking changes to persistent objects and
to relationships other than metric balances.
State Temporal Data: Uni-Temporal
and Bi-Temporal Data
At this point in our discussion, we are concerned with state
data rather than with event data, and with state data that is
queryable rather than state data that needs to be reconstructed.
What then are the various options for managing temporal
queryable state data?
First of all, we need to recognize that there are two kinds of
states to manage. One is the state of the things we are interested
in, the states those things pass through as they change over time.
But there is another kind of state, that being the state of the data
itself. Data, such as rows in tables, can be in one of two states:
correct or incorrect. (As we will see in Chapter 12, it can also
be in a third state, one in which it is neither correct nor incor-
rect.) Version tables and assertion tables record, respectively,
the state of objects and the state of our data about those objects.
Uni-Temporal State Data
In a conventional Customer table, each row represents the cur-
rent state of a customer. Each time the state of a customer
changes, i.e. each time a row is updated, the old data is overwritten
with the new data. By adding one (or sometimes two) date(s) or
timestamp(s) to the primary key of the table, it becomes a uni-
temporal table. But since we already know that there are two dif-
ferent temporal dimensions that can be associated with data, we
know to ask “What kind of uni-temporal table?”
As we saw in the Preface, there are uni-temporal version
tables and uni-temporal assertion tables. Version tables keep
track of changes that happen in the real world, changes to the
objects represented in those tables. Each change is recorded as
a new version of an object. Assertion tables keep track of correct-
ions we have made to data we later discovered to be in error.
Each correction is recorded as a new assertion about the object.
The versions make up a true history of what happened to those
objects. The assertions make up a virtual logfile of corrections
to the data in the table.
Usually, when table-level temporal data is discussed, the
tables turn out to be version tables, not assertion tables. In their
book describing the alternative temporal model [2002, Date,
Darwen, Lorentzos], the authors focus on uni-temporal
versioned data. Bi-temporality is not even alluded to until the
 
Search WWH ::




Custom Search