Databases Reference
In-Depth Information
This relvar would indicate which suppliers were under contract when. Again
the specifications I_KEY {S#, DURING UNFOLDED} and COALESCED
DURING would apply. In addition, the combination {S#, DURING}
would serve as a temporal foreign key in each of S_NAME_DURING,
S_STATUS_DURING, and S_CITY_DURING (and SP_DURING), cor-
responding to the temporal candidate key {S#, DURING} in relvar
S#_DURING. If it is an additional requirement that a supplier under con-
tract at any time must have a name at that time, then {S#, DURING} in rel-
var S#_DURING would constitute a temporal foreign key referencing
S_NAME_DURING.
16
There is another point to be made here, too. With S_DURING as
originally defined, we have to use a fairly nontrivial expression in order to
obtain the status history:
S_DURING { S#, STATUS, DURING } COALESCE DURING
At the same time, the expression to give the much less interesting combined
history is just a simple relvar reference. In a sense, therefore, the suggested
decomposition levels the playing field for queries—or, rather, it makes it
easier to express the more interesting ones and harder to express the less
interesting ones.
The need to decompose S_SINCE is not so compelling. Note in par-
ticular that while (again) triggered procedures could be used to populate the
three historical relvars—for example, deleting a tuple from S_SINCE could
automatically trigger the insertion of tuples into S_NAME_DURING,
S_STATUS_DURING,
and
S_CITY_DURING—there
is
no
need
to
decompose S_SINCE in order to achieve such effects.
5.12
Further Points
In this section we briefly mention three additional points that do not con-
veniently fit into any of the main sections. We present them as questions for
the reader to consider, followed by some suggested answers.
16. Problems arising from such requirements are discussed by C. J. Date, A Note on 1-to-1
Relationships in Relational Database Writings, 1985–1989, Reading, MA: Addison-
Wesley, 1990.
 
Search WWH ::




Custom Search