× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi everyone,

If I understand correctly, people are advising to put as much validation
in the table as possible. This includes Key Constraints, Foreign Key
Constraints, and Check Constraints.

My question is two-fold:

If I want to create a table that has 20 fields, and all of the columns are
required to have data, does this mean I should have 20 check constraints,
testing for <> ' ' or <> 0 for char and dec?

The second part of my question is in regards to the naming of Check
Constraints.

Since constraints must be unique in the schema for which the table
resides, how are people naming their constraints? i.e. are people putting
the file and field names in the constraint name? e.g.

CONSTRAINT GLENN."FileABC Primary Key" PRIMARY KEY (CHARFIELD1)
CONSTRAINT GLENN."FileABC CharField1 Mandatory" CHECK ( CHARFIELD1 <> ' ')
CONSTRAINT GLENN."FileABC CharField2 Mandatory" CHECK ( DECFIELD2 <> 0)
CONSTRAINT GLENN."FileABC CharField3 Mandatory" CHECK ( CHARFIELD3 <> ' ')

Thank you.

Glenn Gundermann
ggundermann@xxxxxx
(647) 272-3295

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.