Databases Reference
In-Depth Information
Program Category optional so we can illustrate how the SET
NULL option works with temporal foreign keys.
The delete rule indicator has the usual three choices. A delete
may be restricted if there are any dependent children; or the
foreign key in those children may be set to NULL; or the
children may be delete cascaded. These same three choices
exist when the dependent children are temporally dependent,
i.e. when their dependency is expressed by means of a TFK
rather than an FK. The delete indicator for a TFK cannot be set
to the null option, of course, unless the TFK required flag is
set to “No”.
But unlike a conventional delete cascade, a temporal delete
cascade does not simply delete a dependent child managed
object. Instead, a temporal delete cascade removes the represen-
tation of a dependent child managed object from all of the clock
ticks from which the managed object it is dependent on is being
removed. So, for example, if a delete to a client removes that cli-
ent's representation from the months of March and April 2015,
then the delete cascade down to that client's policies will guar-
antee that none of those policies are in effect during those two
months.
Business Key Metadata
The business key metadata table, shown in Figure 8.5 , lists
the business key for every temporal table. This is the business
key that uniquely identifies an object. In a non-temporal table,
the business key may or may not also function as the primary
key. But even if a business key is not used as a primary key, a
reliable business key still uniquely identifies a row, since in a
non-temporal table each object is represented by only one row.
This is usually enforced with a unique index in a conventional
database.
Buskey
tbl-nm
bus-key-col-nm
client_nbr
Client
Policy
policy_nbr
Policy_Amendment
policy_amend_nbr
Wellness_Program_Category
wellpgmcat_cd
Wellness_Program
wellpgm_nbr
Wellness_Program_Enrollment
client_oid
Wellness_Program_Enrollment
wellpgm_oid
Figure 8.5 The Business Key Metadata Table.
Search WWH ::




Custom Search