Databases Reference
In-Depth Information
With a conventional referential integrity relationship, a parent
row cannot be deleted as long as any child row exists with a for-
eign key pointing to it. So with a temporal referential integrity
relationship, a parent managed object cannot be withdrawn
from any clock ticks as long as any of those clock ticks are
occupied by a child managed object. Either the delete will be
restricted, the referencing TFKs will be set to NULL, or the delete
will cascade to the dependent children and also remove them
from those same clock ticks.
So let's assume that the RESTRICT option is being used, and
let's consider the first episode of client C903, episode C903-A. A
temporal delete against C903 will withdraw the representation
of C903 from one or more effective time clock ticks. But C903
cannot be withdrawn from the effective time period [Jul 2010 -
May 2011], because P861-A(2), with its TFK of C903, is TRI
dependent on it. On the other hand, C903-A may be {shortened
forwards} by means of a delete transaction which withdraws it
from any or all of the three clock ticks April, May or June 2010,
because during those three clock ticks, it has no dependent
policies.
To generalize: any temporal delete transactions, using the
RESTRICT option, can be processed against C903 without
violating temporal referential integrity as long as they do not
withdraw it from any clock ticks which are occupied by any ver-
sion that has a TFK of C903.
To take just one more example, and continuing to assume
that the RESTRICT option is in effect, let's consider C882-C. It
may be removed from either or both of the clock ticks August
2013 and September 2013, by either {splitting} it or {shortening
it forwards}. But P861-C(8) occupies the effective time period
[Oct 2013 - 12/31/9999], and is TRI dependent on client C882,
specifically on the single-version episode C882-C. Therefore,
the object C882 cannot be removed from those clock ticks, and
therefore the only clock ticks that C882-C episode can be with-
drawn from are August 2013 and September 2013.
A Temporal Delete Cascade
We will conclude this chapter with a row-level analysis of a
temporal delete cascade to client C903, removing the representa-
tion of that client from the effective time period [Oct 2010 - Mar
2011]. This temporal delete against C903 will withdraw the rep-
resentation of P861 from those five months. The result, as we
will see, will be to {split} episode C903-A into two episodes,
and also to {split} episode P861-A into two episodes.
Search WWH ::




Custom Search