Re: The Practical Benefits of the Relational Model

From: Paul Vernon <paul.vernon_at_ukk.ibmm.comm>
Date: Fri, 30 Aug 2002 16:08:39 +0100
Message-ID: <ako204$2m84$1_at_sp15at20.hursley.ibm.com>


>>On this subject, don't dynamic constraints just become static
>>constraints in the case where you keep all history in your database?

>Yes, they do.

Cool

>>Besides, that is, the need to enforce the 'arrow of time' (i.e. can't
>>update the history tuples). So enforcing the 'arrow of time' becomes the
>>only required dynamic constraint

>That depends a bit on what you mean with "keeping all your history in
your
>database".

"No Data Descruction" i.e. no information is ever deleted.

>Given a time-varying predicate P(x) there are two moments to
>consider:
>1. the moment the database was told that P(a) holds and
>2. the moment at which P(a) is true (this can also be an interval).
>These two moments are often assumed to be the same, but in reality almost
>never are. If you only store moment 2 then it should be possible to
update
>history tupels since you may learn afterwards that P(a) did in fact not
hold
>at moment t. However, if you store moment 1 then indeed you should never
>update historic records.

Yep, with you there. Bi-temporal time, that kind of stuff. Darwen, Date & Lorentzos's upcomming Temporal Databases book should be good for this topic.

>But, the transition constraints usually say something about the predicate
in
>function of the moments of type 2.

Not with SQL triggers that compare OLD and NEW rows, thats type 1

> FORALL H1, H2 IN H : IF H1.B > H2.B THEN H1.A > H2.A
>
> and we shouldn't forget that this formulation is easy here because the
>transition condition happens to be transitive. If it isn't then its
>formulation becomes a bit more difficult.

Yep, I'ld noticed that.

I guess I'm suggesting that specifying constraints in terms of OLD and NEW databases is not a good idea.
For one its a pain if you need OLD-1, OLD-2,.. or OLD-between-5-and-10-Secs-ago,...
Or, in my case, bulk load intervals (or sampled snapshots) of history into a data warehouse. To check dynamic constraints, the DBMS would need to map the OLD concept to any attributes holding Type1 info.

And also suggesting, that there is a logical difference between a database that includes the concept of one directional time (via CURRENT TIMEPOINT or some such device) and a database that does not. I.e. the constraint OLD.A > NEW.A only has any meaning becuase I can't travel back in time. ?

Regards
Paul Vernon
Business Intelligence, IBM Global Services Received on Fri Aug 30 2002 - 17:08:39 CEST

Original text of this message