Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Physical size of integer
A copy of this was sent to Info_at_PardoeOnline.com (Guy Pardoe)
(if that email address didn't require changing)
On Sat, 03 Apr 1999 13:07:19 GMT, you wrote:
>If I understand the doc correctly, if I create a field in a table with
>the data type of "Integer" it will really be Number(38).
>
>In terms of physical disk storage, this field won't take up thirty
>something bytes, right?
>
Server concepts manual, chapter 6, section on "Number Datatype" includes this (and much more) about the number datatype:
<quote>
Oracle stores numeric data in variable–length format. Each value is
stored in scientific notation, with one byte used to store the exponent
and up to 20 bytes to store the mantissa. (However, there are only 38
digits of precision.) Oracle does not store leading and trailing zeros. For
example, the number 412 is stored in a format similar to 4.12 x 10^2,
with one byte used to store the exponent (2) and two bytes used to
store the three significant digits of the mantissa (4, 1, 2).
<quote>
So, the number 412 in a number(3) or a number(38) will consume the same exact amount of storage.
>I am used to Visual FoxPro where Integer is a data type taking 4 bytes
>of storage.
>
thats storing the number in a native OS format that is particular to the only platform foxpro runs on. Oracle numbers are stored in a device independent format giving us 38 digits of precision on all platforms, regardless of the word size or binary format on that machine.
>Guy Pardoe
>Pardoe Development Corporation
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA
--
http://govt.us.oracle.com/ -- downloadable utilities