Re: Types and "join compatibility"

From: Marshall Spight <marshall.spight_at_gmail.com>
Date: 8 Aug 2005 00:53:33 -0700
Message-ID: <1123487612.981221.298680_at_g14g2000cwa.googlegroups.com>


x wrote:
> "André Ncss" <andre.naess_at_gmail.com> wrote in message
> news:1123181919.455069.151790_at_g49g2000cwa.googlegroups.com...
>
> >But as I thought about this I realized that it would be much simpler
> >to consider the basic operators. We should really just have to
> >consider union, difference, restrict, project and product. Of these,
> >the only one that requires us to think about types is clearly
> >union.
>
> And difference and restrict.

Okay, difference I can see: what if the subtrahend has attributes that are not in the minuend? But that's not much of an issue; you either say 1) it doesn't matter; ignore it or 2) not allowed. It hardly matters which one you pick.

But restrict? It's kind of weird in that it takes a relation and a predicate, (instead of two relations) but the result type is always the same as the relation. So what's the issue?

> >One thing that troubles me is the
> >relationship between types and constraints.
> >To me it seems that types
> >and constraints overlap to a large degree.

I propose they are completely distinct: types are checked only at compile time; constraints are checked only at runtime. Types can be checked without needing to look at values; constraints must be checked against runtime values.

> One thing that troubles me is the
> relationship between types and relationships.
>
> A mathematical relation is a subset of a cartesian product of some sets.
> As a set it can be defined by :
> a) enumeration
> b) properties
>
> A database relation can be defined by:
> a) the system
> b) enumeration
> c) relational expression
>
> A TTM scalar type can be defined by
> a) the system
> b) union of some types - union type
> c) cartesian product of some types
> d) restriction on a cartesian product of some types
>
> The case d) define a subset of a cartesian product of some sets which by
> definition is a relation (not a relvar).
>
> What is the active domain in the d) case ?

Relation.

Maybe I'm not understanding the question.

Marshall Received on Mon Aug 08 2005 - 09:53:33 CEST

Original text of this message