Databases Reference
In-Depth Information
when the client is not. It follows that no change which reduces
the total number of clock ticks in which a child policy is in effect,
and no change which increases the total number of clock ticks in
which a parent client is in effect, can create a TRI violation. And
so the AVF never has to enforce TRI on a child-side temporal
delete or a parent side-temporal insert. As for temporal updates,
they never alter the number of clock ticks in which an object is
represented. And so, unless they change the parent object for a
version, there is no TRI enforcement needed.
By the same token, any change which increases the total
number of clock ticks in which a child policy is in effect, and
any change which decreases the total number of clock ticks in
which a parent client is in effect, can create a TRI violation.
And so the AVF must enforce temporal referential integrity on
parent-side temporal delete transactions, and also on child-side
temporal inserts.
Child-Side Temporal Referential Integrity
The foreign key in a row in a child asserted version table is a
temporal foreign key (TFK). It contains the object identifier (the
oid) of the object that its object is existence-dependent on. But
this object identifier isn't sufficient to identify a specific row in
the parent table. There may be many rows in the parent table
with that object identifier. And that one row in the child table
may be TRI-dependent on any number of those rows in the par-
ent table. That one row in the child table is TRI-dependent on an
episode in the parent table, an episode of the object designated
by the object identifier in its TFK. The episode it is dependent
on is the one episode of the object designated by that oid that,
within shared assertion time, includes the effective time period
of that version.
Although the parent managed object in a TRI relationship is
an episode, the child managed object is a version. Just as the for-
eign key value in a row in a conventional table may change over
time, so too the temporal foreign key value in a version in a tem-
poral table may change over time from one version of an object
to the next version of that same object. It does not have to be the
same as the TFK value in any other version of the same object.
Even within the same episode, a TFK value may change from
one version in that episode to the next version in that same epi-
sode. TRI child objects are versions, not episodes, because
among versions of the same object, what is referenced by a
temporal foreign key may change over time and, consequently,
over versions.
Search WWH ::




Custom Search