Re: The fable of DEMETRIUS, CONSTRAINTICUS, and AUTOMATICUS

From: Tony Andrews <andrewst_at_onetel.com>
Date: 21 Oct 2004 04:20:37 -0700
Message-ID: <1098357637.473112.10850_at_z14g2000cwz.googlegroups.com>


Laconic2 wrote:
> OK, fair enough.
>
> . But having lived through the transition between "A zip code IS a
five
> digit number" to "An (extended) zip code IS a nine digit number",
I'm
> extremely dubious about "permanent rules". If you allow enough time,
> everything is subject to change. Or how about "a year is a two digit
> number, implicitly added to 1900"? Ouch!

True, "permanent" is relative. It is a judgement call as to whether a constraint is "permanent" (we know of no reason why it should change in the foreseeable future) or not (it is something that we would reasonably expect to change).

That zip code change must have been painful, but I expect you still have "9 digits" hard-wired into the table structures - you don't have a set up where a user can update a table and set max_zip_length=12. You know it is very unlikely, so it isn't worth making it user-flexible.

The fact is, we have to impose restrictions of some kind when designing tables - unless we start using VARCHAR2(4000) or CLOB for every column! But to restrict the SALARY column to NUMBER(5) just because the highest earner now is on $85,000 would be rather foolish. Received on Thu Oct 21 2004 - 13:20:37 CEST

Original text of this message