Re: temporary databases

From: Mikito Harakiri <mikharakiri_at_yahoo.com>
Date: 8 Jun 2002 22:07:48 -0700
Message-ID: <bdf69bdf.0206082107.2170b1de_at_posting.google.com>


"Bob Badour" <bbadour_at_golden.net> wrote in message news:<B5fM8.25168$hW7.206228566_at_radon.golden.net>...
> > > For all practical purposes, all intervals within a DBMS represent a set
> of
> > > discrete points. As a result, a tuple that has an interval attribute
> > > represents a set of discrete propositions. In the absence of any
> interval
> > > attributes, a tuple represents a single proposition.
> >
> > Interval represented as a set of discrete points is just one
> > possibility, and probably not the best one.
>
> Well, given that Date et al. have developed interval type generator extended
> short-cuts for dealing with referential integrity, relational operators etc.
> and given that they have demonstrated the familiar integrity constraints,
> operators etc. are simply special cases of the new ones, one has quite a
> hurdle to clear to demonstrate that the choice is not a good one. While one
> might pretend that an interval contains an infinite set of points, until
> humans develop infinite artifacts it's a moot point.

Why so? Real Analysis is an established theory. Real axis is a dense uncountable ordered set of points.  

> > Given an interval defined
> > by its 2 boundary points and discretisation step, one can always query
> > all discrete points within the interval.
> >
> > Therefore, I would represent an interval by just 2 timestamp columns.
>
> Time intervals are not the only interval types. Two timestamp columns hardly
> qualify as a general solution to the problem, and in a theory newsgroup all
> possible representations of a type are equally valid.
 

If I store just 2 interval boundary points, I have enough data to deduce any other facts about the interval.

On the other hand, if you consider an interval as a set of _some selected_ points it contains, not only your representation is unnormalized, but it also ambiguosly defined.  

> > > Consider an HOURS relation with a single interval column representing
> the
> > > hours of operation and an APPT relation with an interval column
> representing
> > > the time and duration of appointments plus other columns identifying the
> > > customer and reason etc.
> > >
> > > One would like to declare an integrity constraint that the discrete
> points
> > > represented by any APPT interval are a subset of the points represented
> by
> > > the HOURS relation. Likewise, one would like to declare an integrity
> > > constraint that the discrete points represented by all APPT intervals
> are
> > > unique within APPT. One would like uniqueness within the discrete points
> of
> > > time represented by the HOURS relation too.
> >
> > More simple than that:
> > 1. Start and end of an appointment interval both are within HOURS.
>
> Should I assume you prefer not to have a short-cut for declaring foreign key
> constraints?
>
> > 2. Neither start nor end point of an appointment falls within some
> > other appointment.
>
> Should I assume you prefer not to have a short-cut for declaring candidate
> keys? Given the need for logical identity, this is a tough one to swallow.
 

Given interval representation by its two end points, I'm simply unable to specify containment of one interval within the other as foreign key integrity constraint. I have 4 inequality constraints instead. Are my inequality constraints in any way inferior to referential integrity?  

> > One motivation to consider an interval as a set of discrete points
> > might be the fact that sets and subsets are a sweetheart of the
> > relational model.
>
> Whether the set is discrete and finite or whether the set is continuous and
> infinite, it would be just as much a set. Personal motivation is hardly a
> worthy topic for this newsgroup.

Yes, but in order to answer queries about sets Relational Databases necessarily store the whole set. Therefore, the set can't be continuous, or even countable indeed. Databases that can answer queries about infinite domains defined by some equations rather than simple points enumeration are called Constraint Databases.  

> > IMHO the discrete topology of time line is a wrong
> > model.
>
> Build me an infinite computer, and we'll talk about making it continuous
> instead.

Again, matematicians were comfortably working with Real Axis as a continous entity for ages. They didn't ask for infinite supply of paper, however. Could you reconsider your requirements? Received on Sun Jun 09 2002 - 07:07:48 CEST

Original text of this message