Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!drn.maxwell.syr.edu!news.maxwell.syr.edu!postnews.google.com!g14g2000cwa.googlegroups.com!not-for-mail
From: "Marshall  Spight" <marshall.spight@gmail.com>
Newsgroups: comp.databases.theory
Subject: Re: Types and "join compatibility"
Date: 8 Aug 2005 00:53:33 -0700
Organization: http://groups.google.com
Lines: 65
Message-ID: <1123487612.981221.298680@g14g2000cwa.googlegroups.com>
References: <1122744264.923970.145560@f14g2000cwb.googlegroups.com>
   <1122761293.933576.29120@o13g2000cwo.googlegroups.com>
   <1123181919.455069.151790@g49g2000cwa.googlegroups.com>
   <dd7044$i25$1@domitilla.aioe.org>
NNTP-Posting-Host: 24.4.95.46
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1123487618 14986 127.0.0.1 (8 Aug 2005 07:53:38 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 8 Aug 2005 07:53:38 +0000 (UTC)
In-Reply-To: <dd7044$i25$1@domitilla.aioe.org>
User-Agent: G2/0.2
Complaints-To: groups-abuse@google.com
Injection-Info: g14g2000cwa.googlegroups.com; posting-host=24.4.95.46;
   posting-account=s2xCFw0AAAD2mIwYYHAqjdsecwG0axmW
Xref: dp-news.maxwell.syr.edu comp.databases.theory:32745

x wrote:
> "Andr=E9 Ncss" <andre.naess@gmail.com> wrote in message
> news:1123181919.455069.151790@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

