Re: Values for only some constraints in the database

From: Alan <not.me_at_uhuh.rcn.com>
Date: Sat, 05 Jun 2004 16:29:59 GMT
Message-ID: <bymwc.7233$321.6803_at_nwrdny02.gnilink.net>


"Dawn M. Wolthuis" <dwolt_at_tincat-group.com> wrote in message news:c9sp2n$ljn$1_at_news.netins.net...
> Why do we have values for "code files" such as state codes, marital status
> codes, or classification codes in their own data tables while other values
> for constraints, such as a number having to be positive or within a given
> range, in constraints, outside of the database?

These constraints certainly are stored in the database. They are called CHECK constraints. You are confusing "look up" tables with constraints. Look up tables may serve two purposes- enforcing constraints and decoding data, but the constraint may exist as a CHECK constraint as well.

>
> Why are any constraints (other than foreign keys) not stored within the
> database as with any other relevant data? Rules are a form of constraint
> that is stored in the database -- why have any such information in a
> proprietary database constraint rather than encoded with the data?

Blame the vendors. Everyone thinks their method is better. BTW, they are stored in the database as TRIGGERS- it's just that each vendor has their own syntax and programming to support them.

>
> --dawn
>
>
Received on Sat Jun 05 2004 - 18:29:59 CEST

Original text of this message