Re: Notions of Type
Date: 17 Aug 2006 22:48:59 -0700
Message-ID: <1155880138.736464.264430_at_i3g2000cwc.googlegroups.com>
erk wrote:
> Marshall wrote:
> > Whoops! Doesn't fit the template. The second argument isn't
> > a relation. So, strictly speaking, this is not an algebraic operator,
> > because it isn't closed over the type Relation.
>
> To be pedantic, do operators of type R x R x ... -> R x R x ..., for
> any number of R on either side, fit the algebra of R? Or is there some
> cardinality "constraint"?
> > Exercise for the
> > reader: what *is* the type of the other argument? This should
> > make your head hurt a least a little bit.
>
> Maybe I'm off-base, but isn't the type of the second argument a subset
> of the heading of the relation?
> So if RELATION is a type generator, the
> second argument is a type parameterized by the actual type of the
> relation parameter.
S : Relation(A MINUS P)
Ugh. I still need to define MINUS which isn't so bad. But again, what's the type of P? I don't think it's the same as the type of A; that overspecifies things, because we don't need a type attribute in P. We really only need the name column. So now to write the definition of PROJECT, we need some operator ... hmmm ... we need an operator that can take a relation of a given set of attributes and return us another relation like that, but with fewer ... uh oh; now we're in trouble.
> There are various sense of type parameterization
> here, and I'm not smart enough right now to find their proper names.
> Does some type jockey care to rescue us?
> > Note that the type Relation is a what Date et al call a "type
> > generator"
> > and others call a parameterized type.
>
> Are these one and the same?
As best I understand the terms, yes.
> > [...] I think we've all intuited, loosely
> > speaking, that there's a real algebra in there trying to get out.
>
> I think for purposes of the relational model we all know and love
> (especially its useful operators), a real algebra won't suffice. Or am
> I just being short-sighted?
Marshall Received on Fri Aug 18 2006 - 07:48:59 CEST