Re: Storing codes vs. human-intelligible values - best practice?

From: ThanksButNo <>
Date: Sun, 29 Jun 2008 21:16:50 -0700 (PDT)
Message-ID: <>

On Jun 28, 6:36 am, wrote:

> In a new project, it's been suggested to me that I continue to store
> COL_NM values rather than COL_CD values in the child tables with these
> rationales:
> -- It's better to use COL_NM because, for anyone directly querying the
> child tables, COL_NM means something to a human. COL_CD doesn't
> (unless someone has a really good memory).
> -- "Oracle can handle it"
> However:
> -- The new child tables will have orders of magnitude more rows than
> the child tables in the old database; so, although "Oracle can handle
> it", storage may be an issue, etc.
> -- I've always thought it was a best practice to store short codes
> rather than longer human-intelligible values.
> -- As far as I can tell, few if any users will be querying the child
> tables directly; and if they were, they could join to the domain table
> to get the human intelligible values

Don't make the mistake of optimizing too early. Do what makes the most sense, then optimize later. Most of the time you'll never correctly anticipate the areas that actually need to be optimized, even after years of real-world experience.

"Oracle can handle it" is probably correct in most cases. And if it turns out after some thorough testing that Oracle can't, or handles it poorly, *then* you look for bottlenecks.

My 2 cents. :-) Received on Sun Jun 29 2008 - 23:16:50 CDT

Original text of this message