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: NLS_LENGTH_SEMANTICS=CHAR and column storage size

Re: NLS_LENGTH_SEMANTICS=CHAR and column storage size

From: <sybrandb_at_yahoo.com>
Date: 2 Nov 2005 08:16:12 -0800
Message-ID: <1130948172.291165.25680@g43g2000cwa.googlegroups.com>

Laurenz Albe wrote:
> My company considers using UNICODE databases with
> NLS_LENGTH_SEMANTICS=CHAR to avoid problems inserting a value like
> 'Länge' into a CHAR(5) or VARCHAR2(5) column.
>
> Now I am concerned about space requirements of such a database
> because I don't understand enough about the storage of such columns.
>
> DATA_LENGTH for a CHAR(5) or VARCHAR2(5) column will be 20.
>
> - Does that mean that there will be 20 bytes reserved for this column
> in each row?
> - Is it possible that migrated databases might grow by a factor 4?
> - Is there documentation how such columns are stored in Oracle?
>
> Thank you,
> Laurenz Albe

Actually,
If you only deal with characters in the Latin-1 alphabet, you don't need Unicode at all. The ä is in the Latin-1 alphabet and can be dealt with in WE8ISO8859P15 (Unix) or WE8MSWIN1252.

Unicode characters take 1-4 bytes depending on actual UTF characterset. As to your questions
1 If they are CHARs yes, if they are VARCHAR2's no 2 yes, that is possible. This would be a worst case scenario though. 3 There is a Globalization manual (Formerly NLS support manual) in which these issues are explained in detail.

I would urge your management to reconsider. You don't seem to need Unicode. If you are going to store Arabic or Kanji, Unicode is mandatory.

Regards

--
Sybrand Bakker
Senior Oracle DBA
Received on Wed Nov 02 2005 - 10:16:12 CST

Original text of this message

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