Re: Foreign superkey support

From: Marshall <marshall.spight_at_gmail.com>
Date: 8 Aug 2006 22:28:58 -0700
Message-ID: <1155101338.315201.149050_at_m73g2000cwd.googlegroups.com>


Bob Badour wrote:

> Marshall wrote:
> > paul c wrote:
> >
> >>Perhaps all I'm saying is that the basic relational algebra doesn't need
> >>a foreign key concept which I admit is a deviation from the specific
> >>question.
> >
> > I don't think of constraints as being part of the algebra per se.
>
> They are not. The algebra (or even better the calculus) is the language
> with which we describe the constraints.

Interesting.

I've mostly been ignoring the calculus, since the algebra is plenty enough to study. However I've also been toying with a constraint language in my spare time. My constraint language is basically the Tropashko algebra, with the addition of universal and existential quantification (forall and exists) along with ways to specify what relvars and attributes thereof that quantified expressions range over. After reading your comment, I remembered that TTM has a sketch of a relational calculus version of TutD, so I went and looked that up, and it appears to be roughly the TTM algebra with the addition of quantification and range variables. So I guess I'm on a decent track.

It actually makes me wonder if I was simply remembering TTM but not remembering that I was remembering. But I think I actually got most of my constraint ideas from "What Not How" which I don't recall identifying the constraint language as being the calculus. But I could easily not be remembering it sufficiently.

> > Constraints
> > are a useful mechanism for ensuring integrity of variables, whereas the
> > algebra is a way of constructing values from other values. (Including
> > the values in variables.)
>
> And including the boolean values of assertions.
>
>
> > Note that the algebra is what you do queries
> > with, but constraints are relevant only when doing DML:
> > insert, update, delete.
>
> Ironically, logical constraints can help with physical performance
> optimization even for data retrieval.

Yes, and I also envision a day when they can be used in doing proofs of code properties.

> > (Although we may use the algebra to construct values that
> > we then insert, for example.)
> >
> > It is quite interesting to consider the idea of constraints as
> > descriptive entities for values, in addition to being prescriptive
> > for variables. We can then consider propogation of these
> > descriptions through the algebraic operations.
>
> Yes, that is quite interesting especially with respect to view updatability.

Indeed. It is the one remaining nut to crack, so to speak.

Marshall Received on Wed Aug 09 2006 - 07:28:58 CEST

Original text of this message