Databases Reference
In-Depth Information
as they are now. Its rows are claims about these things which we
currently make. Current Data is what most of our database
tables contain. It is a record of what we currently believe things
are currently like.
If our asserted version table previously existed as a conven-
tional table, there are likely to be any number of production
queries that reference it. To make the conversion of this table
to an asserted version table transparent to these queries, we must
rename the table and use its original name as the name of this
view. This is why we have renamed such tables by appending
“_AV” to them. Doing this for the Policy table we are using in
these examples, we renamed it as Policy_AV.
Here is a view preliminary to the one which does re-present
Current Data. This view contains all currently asserted current
versions.
CREATE VIEW Policy_CACV
AS SELECT oid, client, type, copay
FROM Policy_AV
WHERE asr_beg_dt Now() AND asr_end_dt > Now()
AND eff_beg_dt
Now() AND eff_end_dt
Now()
>
In the original non-temporal table, there was one row per
object. Since each oid uniquely identifies an object, and since
there can only be one row for each object that is currently
asserted as being currently in effect, this view also contains
one row per object. In addition, since, at every point in time,
the original table contains rows that represent what we currently
believe the objects described by those rows are currently like, an
asserted version table of currently asserted current versions will
contain, moment for moment, exactly the same business data.
Like the conventional Policy row, this view uses exactly one
row to re-present one policy. But unlike the conventional Policy
table, these rows include oids, not the column or columns that
were the primary key in the original conventional table. And they
what we used to claim
what we currently claim
what we will claim
what things
used to be like
what we currently claim
things are like now
what things
are like
what things
will be like
Figure 13.8 Current Data.
Search WWH ::




Custom Search