Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!drn.maxwell.syr.edu!news.maxwell.syr.edu!postnews.google.com!g43g2000cwa.googlegroups.com!not-for-mail
From: "Alfredo Novoa" <alfredo_novoa@hotmail.com>
Newsgroups: comp.databases.theory
Subject: Re: Translating constraints to RM Terms
Date: 6 Jun 2005 01:36:34 -0700
Organization: http://groups.google.com
Lines: 28
Message-ID: <1118046994.359182.212940@g43g2000cwa.googlegroups.com>
References: <ianbn2-dj5.ln1@pluto.downsfam.net>
NNTP-Posting-Host: 85.49.98.240
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1118046999 31369 127.0.0.1 (6 Jun 2005 08:36:39 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 6 Jun 2005 08:36:39 +0000 (UTC)
In-Reply-To: <ianbn2-dj5.ln1@pluto.downsfam.net>
User-Agent: G2/0.2
Complaints-To: groups-abuse@google.com
Injection-Info: g43g2000cwa.googlegroups.com; posting-host=85.49.98.240;
   posting-account=joxBkAwAAADsPEyGCMIJ7NnYIJVUS3AU
Xref: dp-news.maxwell.syr.edu comp.databases.theory:31227


Kenneth Downs ha escrito:

> Consider table X with columns A and B.  There is a constraint that A must be
> less than B.  While we discuss such constraints every day, I realize I do
> not know how to express such constraints in relational terms.

This is one of the easiest constraints we can imagine:

constraint X IsEmpty(T where B >= A);

> For instance, A is actually a domain, as is B, but the constraint A < B must
> in fact be part of the very definition of the domain A, and here we are
> defining one domain in terms of another.

No, you are confusing everything. Domains and columns are not the same.

> I realized I have not seen this
> disccussed in the year or so I have been a regular here.  Is defining one
> domain in terms of another allowed and considered trivial, no big deal?

It is allowed but I would not say that it is trivial. I suggest you to
read Date's Intro to Database Systems and The Third Manifesto. Although
it has nothing to do with your constraint, of course.


Regards

