Databases Reference
In-Depth Information
TFK
src-tbl-nm
col-nm
tar-tbl-nm
req-
flg
del-rule-
ind
Policy
client_oid
Client
Ye s
Cascade
Policy_
Amendment
policy_oid
Policy
Ye s
Cascade
Wellness_
Program
wellpgmcat_
oid
Wellness_
Program_
Category
No
Set Null
Wellness_
Program_
Enrollment
client_oid
Client
Ye s
Cascade
Wellness_
Program_
Enrollment
wellpgm_oid
Wellness_
Program
Restrict
Ye s
Figure 8.4 The Temporal Foreign Key Metadata Table.
child row depends on the existence of the parent object
represented by a parent episode. In our model, for example,
policies are existence dependent on clients, policy amendments
are existence dependent on policies, and so on.
But unlike a conventional foreign key, which picks out a
unique row in the parent table, a temporal foreign key
designates an object, but does not pick out any one managed
object, any specific episode or version of that object. The AVF
takes the oid and searches for an episode of that object whose
assertion and effective time periods include those of the child
row. The temporal foreign key itself is always a single column,
containing an oid value; none of the other columns making up
a full Asserted Versioning primary key are part of the TFK.
Both the source table name and the target table name
columns are foreign keys back to the Table Type metadata table.
For each entry, the source table name column says which table
contains the TFK, while the target table name column says
which table is referenced by the TFK. Column name provides
the name of the TFK column itself. Generally, all TFK columns
have the same name as the oid they point to, but this obviously
will not work when there are two or more TFKs in the same child
table that point to the same parent table.
The required flag says whether the TFK is required or not.
Like FKs, TFKs may be optional or required. If they are required,
the TFK in each row of the table must, at all times, contain an
oid to an object one of whose episodes has an effective time
period that includes ([ fills -1 ]) the effective time period of the
row that contains the TFK. If the TFK is not required, the TFK
in each row must either contain a valid oid reference, or be null.
In our sample database, we have made the TFK to Wellness
Search WWH ::




Custom Search