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

Home -> Community -> Usenet -> c.d.o.server -> Re: When to use check constraints and when to use small tables?

Re: When to use check constraints and when to use small tables?

From: <plinehan_at_yahoo.com>
Date: 25 May 2006 00:15:25 -0700
Message-ID: <1148541325.836268.300850@y43g2000cwc.googlegroups.com>

> If you think the # of values is going to change, or the values are
> going to alter, and you don't want to have to change the app or the
> check constraints: put them in a table.

Well, what I was asking was when it is appropriate to change the app by modifying check constraints on a table - is the rule about no DDL in an application an *_ABSOLUTE_* one, and if not, what are the circumstances under which it should be allowed?

> If the number of values is more than 3: always put them in a table.
> You might forget a state or miscount them.

Ah, I see. This is a perspective I had forgotten about when framing my original post - I forgot to think about those application programmers for example who will have to write reports on the data in the app - it's true enough that anything beyond two or three is probably too much - I mean gender is OK but what about title?

The part of my post which hasn't been addressed is what sort of indexes to put on the Person table - i.e. a bitmap index if it's only two values - what about higher numbers - what's the rule of thumb for the cardinality of bitmap indexes?

Also, the construction of these "minor" tables - should they be indexed, and if so, what sort of index should be used - and if there are differences, why?

Paul... Received on Thu May 25 2006 - 02:15:25 CDT

Original text of this message

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