Databases Reference
In-Depth Information
wrong day, then again the necessary revision will involve updates to both
relvars.
If SP_DURING is similarly decomposed into SP_SINCE and
SP_DURING, we need to take another look at the foreign key constraints.
In the case of SP_DURING, we have already seen (in Section 5.9) that the
relvar definition might include the following:
FOREIGN I_KEY { S#, DURING UNFOLDED } REFERENCES
S_DURING
¼
As we said in Section 5.9, the intent of this specification is that if supplier Sx
is shown as able to supply some part during interval i, then S_DURING
must show that Sx was under contract throughout interval i. We went on to
say that {S#,DURING} in relvar SP_DURING might now be regarded as a
temporal foreign key.
In the case of SP_SINCE, however, the corresponding foreign key is
only semitemporal; thus, we are still faced with the problem of having to
deal with the cumbersome constraint we showed in Section 5.3:
CONSTRAINT AUG_SP_TO_S_FK
IS_EMPTY (((S_SINCE RENAME SINCE AS SS) JOIN
(SP_SINCE RENAME SINCE AS SPS))
WHERE SPS SS);
Thus, horizontal decomposition does arguably lead to certain problems—the
problem of cumbersome constraints, and the problem of updating current
and history relvars simultaneously (as it were). At the time of this writing,
we have not seen any specific proposals for shorthands to help with either of
these problems. Perhaps further research is needed. Of course, these prob-
lems do not arise in the case where the DURING relvar is used for infor-
mation about the future as well as the past and present. While including the
future allows us to drop the SINCE relvar, it also requires us to predict the
future ending times. We note also that the problems in question do not arise
in the approach proposed in [1].
5.11.2
Vertical Decomposition
Even before temporal data was studied—and before SQL was invented, for
that matter—some writers argued in favor of decomposing relvars as far as
possible, instead of just as far as classical normalization would require. Some
Search WWH ::




Custom Search