Databases Reference
In-Depth Information
Another aspect of the semantics of a temporal insert is the
interpretation of its target span. If the transaction does not sup-
ply an effective end date, that date defaults to 12/31/9999. The
result is that an open episode will be created. However, in the
scenario shown in Figure 9.6 , an open episode cannot be cre-
ated, and the AVF will reject the attempt to create one. For if
we tried to create an open episode with an effective begin date
prior to version 7, that new episode would collide with one of
the three episodes shown, and thus violate the temporal entity
integrity (TEI) constraint. And if we tried to create an open epi-
sode, or in fact any episode, with an effective begin date on or
after May 2013, it would collide with Episode C, whose effective
end date is 12/31/9999.
It follows that there can be at most one open episode for an
object, within any period of assertion time. No episode, open
or closed, can be created later than an open episode because if
it were created, it would occupy effective time already occupied
by that open episode. And an open episode cannot be created
earlier than any other episode, open or closed, for the same
reason.
What of a temporal insert that specifies a non-12/31/9999
effective end date? Here the situation is more straightforward.
Such transactions satisfy TEI just in case none of the clock ticks
specified in the transaction's target span are already occupied by
that object. And we should remember that because of our
closed-open convention, TEI will still be satisfied if an episode
already exists whose begin date has the same value as the end
date of the transaction's target span, or one whose end date
has the same value as the begin date of the transaction's target
span, or if both such episodes are present.
The Temporal Insert Transaction: Mechanics
The scope of a conventional insert is a single row in the target
table. If the transaction is successful, the result is a new row
added to the table. The scope of a temporal insert is a designated
period of effective time, within current assertion time. So, in
Figure 9.6 , that scope cannot include any of the clock ticks
already occupied by any of the three episodes shown there, but
can include any other clock ticks. We should note that this
means that the scope of the insert cannot be any clock tick from
May 2013 forward. Since Episode C is open, it extends to 12/31/
9999; consequently any other episode for the same object any-
where in the effective period starting with May 2013 would
[ intersect ] that episode.
Search WWH ::




Custom Search