| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Relational Databases and Their Guts
"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 Received on Sun Jun 22 2003 - 22:03:47 CDT
![]() |
![]() |