Databases Reference
In-Depth Information
The second illustration in Figure Part 1.1 is of a uni-temporal
Customer table. In this kind of table, we may have multiple rows
for the same customer. Each such row contains data describing
that customer during a specified period of time, the period of
time delimited by bd 1 and ed 1 .
In order to keep this example as straightforward as possible,
let's agree to refrain from a discussion of whether we should or
could add just the period begin date, or just the period end date,
to the primary key, or whether we should add both dates. So in
the second illustration in Figure Part 1.1 , we show both bd 1
and ed 1 added to the primary key, and in Figure Part 1.2 we show
a sample uni-temporal table.
Following a standard convention we used in the articles lead-
ing up to this topic, primary key column headings are underlined.
For convenience, dates are represented as a month and a year.
The two rows for customer id-1 show a history of that customer
over the period May 2012 to January 2013. From May to August,
the customer's data was 123; from August to January, it was 456.
Now we can have multiple rows for the same customer in our
Customer table, and we (and the DBMS) can keep them distinct.
Each of these rows is a version of the customer, and the table is
now a versioned Customer table. We use this terminology in this
topic, but generally prefer to add the term “uni-temporal”
because the term “uni-temporal” suggests the idea of a single
temporal dimension to the data, a single kind of time associated
with the data, and this notion of one (or two) temporal
dimensions is a useful one to keep in mind. In fact, it may be
useful to think of these two temporal dimensions as the X and
Y axes of a Cartesian graph, and of each row in a bi-temporal
table as represented by a rectangle on that graph.
Nowwecometothelastofthethree lustrationsin
Figure Part 1.1 . Pretty clearly, we can transform the second
table into this third table exactly the same way we transformed
the first into the second: we can add another pair of dates to
the primary key. And just as clearly, we achieve the same effect.
Just as the first two date columns allow us to keep multiple
rows all having the same identifier, bd 2 and ed 2 allow us to keep
bd 1
ed 1
id
data
id-1
May12
Aug12
Aug12
123
456
345
id-1
id-2
Jan13
Nov12
Jul12
Figure Part 1.2 A Uni-Temporal Table.
Search WWH ::




Custom Search