Databases Reference
In-Depth Information
forwards, there is an episode ahead of it to “bump into”. Simi-
larly, when any but the earliest episode of an object is extended
backwards, there is an episode behind it to bump into.
In either case, however, a successful temporal insert will
{merge} the two adjacent episodes together. The resulting epi-
sode will contain all the versions in both of the original episodes,
and also the one version that caused them to {merge}.
To illustrate a temporal transaction merging two episodes,
let's go all the way back to Figure 10.2 and assume that it is
now January 2012. Immediately after this next transaction is
completed, the history shown in Figure 10.2 will no longer be
currently asserted. Instead, it will be the history of the policy as
asserted from when the previous transaction was applied up to
January 2012. The new currently asserted history of the policy
will be as shown in Figure 10.7 .
It is now January 2012, and the following transaction is sub-
mitted to the AVF:
INSERT INTO Policy [P861, C882, POS, $15] Oct 2010, Apr 2011
Version 7 looks like this:
P[P861[Oct10-Apr11][Jan12-9999][Feb10][C882, POS, $15]
[Jan12]]
The AVF sees that this transaction will {merge} two episodes. It
can tell that because there are already two versions of that same pol-
icy in the table such that the effective end date of the earlier one
[meets 1 ] the effective begin date on the transaction, and the effec-
tivebegindateofthelaterone[meets]theeffectiveenddateonthe
transaction. Because the result is a single episode, all versions in that
episode must have the same episode begin date. Therefore, to com-
plete the transaction, the AVF sets the episode begin date of version 7
to February 2010, and withdraws versions 3 and 4, replacing them
with versions that are identical except that they remain in current
assertion time and have an episode begin date of February 2010.
We have now discussed all the temporal extent trans-
formations that are carried out in response to a temporal
insert transaction. At the end of this chapter, we will review the
Episode A
1
2
7
5 3
6 4
Jan
2010
Jan
2011
Jan
2012
Jan
2013
Jan
2014
Figure 10.7 Merging Adjacent Episodes: After the Transaction.
Search WWH ::




Custom Search