Databases Reference
In-Depth Information
be a TRI parent to P861-C(8). The new C882-C(5) goes into effect
on May 2014, so its effective time period does not cover the ear-
lier clock ticks in P861-C(8). And C882-C(4) ends its effectivity on
May 2014, so its effective time period does not cover the ongoing
effectivity of P861-C(8), whose effective time period is, once
again, [Oct 2013 - 12/31/9999].
As in the previous chapter, we assume for now that all
relationships exist within current assertion time, and that all
temporal transactions specify an assertion time of [Now() - 12/
31/9999]. We also assume that delete transactions against clients
cascade down to the policies that they own, in accordance with
the metadata declaration made in the Temporal Foreign Key
metadata table, shown in Figure 8.4.
We can read the somewhat schizophrenic history of policy
P861 from this diagram. 4 Think of a vertical line running from
the top to the bottom of the diagram, and initially positioned
at January 2010. As time passes, this line moves to the right.
The history of P861 is recorded in the begin and end dates of
its versions. So as that line reaches each such date, there is a
change in the state of P861.
As Figure 11.1 shows, the policy was originally owned by cli-
ent C882. The only episode of C882 whose effective time period
included that of P861, at the time P861-A(1) was created, was
C882-A. And so that became the episode of client C882 that the
policy pointed to.
The next thing that happened was that, on July 2010, P861
changed hands. At that time, ownership was transferred to client
C903. The only episode of C903 that existed at that time was
C903-A, and so that became the parent episode to P861, begin-
ning on that date. This change of ownership is recorded in ver-
sion 2 of P861-A. Note that C903-A became effective on April
2010, two months after P861-A did. If episodes were the child
managed objects in TRI relationships, then this relationship
would be invalid. But they are not. C882-A is the parent to
P861-A(1). C903-A is the parent to P861-A(2).
The third event in the life of P861 was a delete cascade
issued against client C903. As of May 2011, C903 was no longer
a client. Because C903 owned policy P861 at that point in time,
the policy's existence was terminated on that same date, May
2011.
4 Schizophrenic in that the policy can't make up its mind which client it belongs to.
As unlikely as such a policy history might be, in the real world, it will have to serve as
an example of how TRI relationships are managed.
Search WWH ::




Custom Search