Re: The fable of DEMETRIUS, CONSTRAINTICUS, and AUTOMATICUS
From: Kenneth Downs <firstinit.lastname_at_lastnameplusfam.net>
Date: Wed, 20 Oct 2004 14:11:14 -0400
Message-ID: <2o96lc.gmh.ln_at_mercury.downsfam.net>
>
> I hate to keep beating the same dead horse, but won't CREATE DOMAIN do
> exactly this?
>
> CREATE DOMAIN valid_salary CONSTRAINT valid_salary BETWEEN 0 AND 100000;
>
>
> CREATE TABLE EMPLOYEES
> (...
> SALARY VALID_SALARY,
> ...);
Date: Wed, 20 Oct 2004 14:11:14 -0400
Message-ID: <2o96lc.gmh.ln_at_mercury.downsfam.net>
Laconic2 wrote:
>
> "Marshall Spight" <mspight_at_dnai.com> wrote in message
> news:Q3wdd.217587$wV.174119_at_attbi_s54...
>
>> I must say I am impressed with your creativity. However, I find this >> exact solution unsatisfying, but I have a *related* idea which you >> may find interesting. >> >> What if we could *declare* a set according to its properties >> (constraints, really) and use them as if they were regular sets? So we >> could have a set ValidSalaries that was declarad as the set of all >> integers between 0 and 100,000?
>
> I hate to keep beating the same dead horse, but won't CREATE DOMAIN do
> exactly this?
>
> CREATE DOMAIN valid_salary CONSTRAINT valid_salary BETWEEN 0 AND 100000;
>
>
> CREATE TABLE EMPLOYEES
> (...
> SALARY VALID_SALARY,
> ...);
Yes. In fact, I wondered if you were going to jump in ;)
But see my reply to Marshall, my problem is that CREATE DOMAIN is DDL.
-- Kenneth Downs Use first initial plus last name at last name plus literal "fam.net" to email meReceived on Wed Oct 20 2004 - 20:11:14 CEST