Re: Relational Databases and Their Guts

From: daveb <davebestOBVIOUS_at_usa.net>
Date: Mon, 23 Jun 2003 00:10:26 -0700
Message-ID: <bRKdnaLEjNp_OmujXTWc-w_at_speakeasy.net>


"Marshall Spight" <mspight_at_dnai.com> wrote in message news:n6uJa.108528$YZ2.276226_at_rwcrnsc53...
> "Todd Bandrowsky" <anakin_at_unitedsoftworks.com> wrote in message
news:af3d9224.0306221504.68914683_at_posting.google.com...
> >
> > Assume I have two tables R1 and R2. The number of columns in R1 is
> > irrelevant, except that there exists in R1 a primary key, R1PK, and
> > the rest of the columns in R1 we will call R1O. R2 has a minimum of 3
> > columns, the first of which is a foreign key into R1, the second is a
> > unique identifier to satisfy a one to many relationship between R1 and
> > R2, and the third we will call RCOL.
> >
> > Let [] be used to refer to the specific row for the primary key of a
> > given table Rn. Thus, for any given R1[ R1PK ], there are 0..N of
> > RCOL. We will later refer to the set of names for a specific PK as
> > RCOL( R1PK ).
> >
> > Let () be used to refer, by index, or by name, to a specific column on
> > a view. Thus, one might say R1( R1PK ) refers to the column name, and
> > R1( 0..N ) refers to columns 0 through N, and, finally, R1( 0...N -
> > R1PK ) refers to all of the columns except for the primary key of R1.
> >
> > 1) Is there any way using the basic relational algebra operators, to
> > arrive at a final view RResult such that the columns of RResult are as
> > follows:
> >
> > R1( R1PK + RCOL( R1PK ) + R1O )?
>
> ISTM that all that is necessary to do this is an aggregate operator that
> will aggregate a column across a relation into a list (or perhaps set.)
Then
> one could use the aggregate operator to group the various RCOL values
> for each R1PK into a list. The resulting relation would have a list of
> RCOL's type as the associated column type. The case of *no* values
> would produce a zero-length list.
>
> I'm not aware of any existing DBMS that has such an aggregate operator,
> but now that I've thought about it, it seems like a necessity.
>
>
> Marshall
>

I've just started looking at The Third Manifesto, and if I understand it right, they allow relation valued attributes (columns), and define nest and unnest operators to, well, do the obvious. And based on the information principle, these operators must apply to tuples/relations and result in tuples/relations. Don't know if they would be considered aggregate operators...will have to study more.

--
David Best
(Remove the obvious to reply)
Received on Mon Jun 23 2003 - 09:10:26 CEST

Original text of this message