Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Help on Data Integrity Constraints

Re: Help on Data Integrity Constraints

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Wed, 04 May 2005 14:17:27 +0200
Message-ID: <d5ae93$gln$1@news1.zwoll1.ov.home.nl>


andrewst_at_onetel.com wrote:

> vsatya_at_gmail.com wrote:
> 

>>Suppose I have a table "Master" with 3 fields
>>Table Name: "Master"
>>Columns:
>>Type Varchar2(10)
>>Code Varchar2(5)
>>Desc Varchar2(20)
>>
>>Combination of Type & Code is the Primary key.
>>
>>Let's say this table acts like master/setup data to different
> 
> constants
> 

>>that will be used in the system.
>>
>>Sample Data:
>>
>>Type Code Desc
>>--------------------------------------
>>AISTATUS A Active
>>AISTATUS I InActive
>>ROLE MGR Manager
>>ROLE DIR Director
>>ROLE SRMGR Senior Manager
>>SEX M Male
>>SEX F Female
>>.....
>>.....
> 
> 
> This is the infamous "One True Lookup Table" (OTLT), which is a common
> lousy approach to database design along with its friend the
> Entity-Attribute-Value table (EAV):
> 
> http://tonyandrews.blogspot.com/2004/10/otlt-and-eav-two-big-design-mistakes.html
> 

Don't agree with you - for never (or almost never) changing values, this approach works.
Heck, it's even standard Designer code, specifically for Domain values. I know Oracle has some daft defaults (EXP compress=y), but nobody ever questioned this approach.

In general, yes lookup tables should be implemented as such, but having a 'gender' table, with only 2, possibly 5 values ever, is too much.
Do not call it sex... those crazy Americans might be offended.

-- 
Regards,
Frank van Bortel
Received on Wed May 04 2005 - 07:17:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US