Re: Design Question

From: Jared Still <jkstill_at_gmail.com>
Date: Fri, 16 Oct 2009 11:07:04 -0700
Message-ID: <bf46380910161107i4032cf08o4f089217e9a70384_at_mail.gmail.com>



Saving space is always good as long as serious compromises to design are not required.

Aside from the space issues, spelling out the entire name assumes that no one will ever want to change that name.

It also assumes that the all methods of putting data in the table will get it right.

Using a code as you have suggested is much better than spelling it out. Changing the name from say 'Debit Card' to 'ATM Transaction' then becomes trivial.

The code 'D' in that case would no longer mean anything however. Personally I would just use an integer if I thought there was any chance of the definition of the code changing.

Developers and Users may tell you that the meanings will never change. Just remember that 'never' is a very long time.

Dan has already referenced 'Normalize for Performance' so I won't belabor the point too much. :)

Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist Oracle Blog: http://jkstill.blogspot.com Home Page: http://jaredstill.com

On Fri, Oct 16, 2009 at 9:58 AM, Balakrishnan, Muru < Muru.Balakrishnan_at_dishnetwork.com> wrote:

> Hello Experts,
>
>
>
> I request your opinion on, whether column values in large tables with more
> than million rows should be codified for better performance. For example a
> customer table could have following columns, gender and card type. In our
> team many prefer to spell out the entire word for every row (as Male,
> Female, Credit Card, Debit Card etc), but my recommendation is to codify (M,
> F, C, D, etc) with a lookup tables when needed. Their argument is, hardware
> is cheap including storage, helps readability and less joins. My argument
> is, production hardware is not cheap (we can buy 1TB for home under $100,
> but production hardware costs thousands), less overall blocks used improves
> performance, negligible problem with joining lookup tables. Please give your
> opinion.
>
>
>
> Gender
>
> ---------
>
> M vs Male
>
> F vs Female
>
>
>
> Card type
>
> -------------
>
> C vs Credit Card
>
> D vs Debit Card,
>
> P vs Prepaid Card
>
>
>
> Thanks in advance,
>
> Muru
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Oct 16 2009 - 13:07:04 CDT

Original text of this message