Re: Code Validation in CASE-generated CDE Application

From: Simon Holt <holt_at_ntrust.org.uk>
Date: 5 Dec 1994 14:29:11 GMT
Message-ID: <3bv83n$gnc_at_sundev.ntrust.org.uk>


Ted FC (tedfc_at_aol.com) wrote:

: We all agree that small,static code sets like "gender code (M,F)"
: should be implemented in the database as check constraints.

[cut]

: The criteria for these code types are:
 

: 1.) No attributes other than the key and a name or description.
: 2.) More than a few (>6) discrete values.
: 3.) Subject to routine maintenance (inserts,deletes).
 

: The estimate of the number of data elements that fall into this
: category range from 50 to several hundred.

I would consider implementing code sets like "Gender" as domains.

Domain gender = "M" or "F"

This obviously wouldn't work if the data set was volatile (considering your 3rd point above), but with something like "gender", you are on a winner: You are not going to have to update the values - no one is going to "discover" a new gender, and all possible values are covered by it.

That is'nt going to help where you have need of a small, but relatively volatile data set, however.. :-(

In that case, the solution of "codes for codes" as suggested in the previous post is the best (IMHO)


Simon Holt 			|	Voice:	+44 (0) 1373 826826 x253
(Systems analyst)		|	Inet:	holt_at_ntrust.org.uk   
	My opinions are not necessarily those of my employer
Received on Mon Dec 05 1994 - 15:29:11 CET

Original text of this message