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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: whic one to choose

Re: whic one to choose

From: Peter McLarty <peter.mclarty_at_incts.com>
Date: Wed, 11 Jul 2001 04:44:58 -0700
Message-ID: <F001.00346B84.20010711042024@fatcity.com>

I would think that their behavior is laziness. When you create a form they have a nice neat filed length to use to display their data in. I would think that you would only use char these days for items that have a known fixed length, Social security number, phone number, zip or postcode. All other data you want to store in char format would be in varchar as it uses space in your database more efficiently.

You will encounter no problems with doing it this way

Peter

At 07:25 PM 11/07/2001, you wrote:
>The definition of char and varchar2 is clear from docu that one is used for
>fixed length and the other for variable.
>We are reviewing one database desgin given to use from our developers in
>that they have chosen to use CHAR(n)
>data types at many places, even though the field can have variable lenght
>data.
>For example for a column as region_code it is set as char(5) not this value
>can be '01' , 'CEN','WEST' etc
>would it be wise to make it varhar2(5).
>The reason is that if you want to query the colum in a where clause (if you
>have chosen char(5)) then I think
>you have post fix spaces unnecessarily right? (where region_code = '01
>'
>becuase region_code = '01' would return no rows.
>
>1)
>Any ones has any suggestions on how to choose char and varchar2 for columsn
>that are small in lenght like < 30 characters and unsire of its fixed or
>variable?
>
>2)
>Is there any implication if we convert all those small lenght columsn for
>which we are not sure of data-lenght from char to varchar2???any side
>affects in making varch2?
>
>Regards
>
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author:
> INET: MShahid_at_SaudiFrenchBank.com.sa
>
>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>San Diego, California -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from). You may
>also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Peter McLarty
  INET: peter.mclarty_at_incts.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Jul 11 2001 - 06:44:58 CDT

Original text of this message

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