Re: Translating constraints to RM Terms

From: Alfredo Novoa <alfredo_novoa_at_hotmail.com>
Date: 6 Jun 2005 01:36:34 -0700
Message-ID: <1118046994.359182.212940_at_g43g2000cwa.googlegroups.com>


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 Received on Mon Jun 06 2005 - 10:36:34 CEST

Original text of this message