Databases Reference
In-Depth Information
table. The unique identifier of the policy is its object identifier,
P861. The AVF supplied this unique identifier, since on an insert
transaction, a surrogate key value has not yet been assigned to
represent the object. This version is effective beginning in Janu-
ary 2010 because it was applied in January 2010 and no effective
begin date was specified on the temporal transaction. It will
remain in effect until further notice because no effective end
date was specified.
The third component of the primary key of an asserted ver-
sion table is the assertion begin date. Because no assertion begin
date was specified on the temporal transaction, the current date
is used. In other words, the default is for a version to be asserted
as soon as it is created. The assertion end date is set to 12/31/
9999, as it is for all temporal transactions, meaning that we will
continue to assert what this row represents until further notice.
A valid temporal insert transaction results in a new episode
unless it [meets] or [meets -1 ] an adjacent episode. If it [meets -1 ]
an earlier episode, its begin date matches the end date of that ear-
lier episode, and it has the effect of extending that episode for-
wards in time. If it [meets] a later episode, its end date matches
the begin date of that later episode, and it has the effect of
extending that episode backwards in time. 2 And if it does both,
its begin and end dates match, respectively, the end date of the
earlier episode and the begin date of the later episode, and it
has the effect of “filling in the gap” between those two episodes,
merging them into a single episode. In this chapter, however, we
assume that our temporal insert creates a new episode.
An episode begin date is always set to the effective begin date
of its earliest version. So in this case, since this transaction
creates the initial version of a new episode, the episode begin
date is set to January 2010.
A Temporal Update Transaction
In the scenario shown in Figure 7.5 , it is nowMay 2010, and we
are about to change the policy's copay amount to $20.
We can read this diagram as follows. Row 1 represents the only
version of this episode of policy P861. The business data on this
row became effective on January 2010. It is currently in effect
and will remain in effect until further notice. We currently assert
that row 1 is correct, i.e. that the statement made by row 1 is true.
Since January 2010, this policy has been owned by client C882,
and has been an HMO policy with a $15 copay. The client column
2 We will sometimes use “contiguous with” to mean “either [meets] or [meets -1 ]”.
 
Search WWH ::




Custom Search