Oracle uses an uncommon number data type to store data. This type uses the BCD code (The hexadecimal 0x99 represents the decimal 99 ). ANSI standard data types, such as integer, float, and double, are aliases of the number data type. Integer data types do not support decimal, float, and double constraints to satisfy integer data types.
The IEEE 754 standard format is the most common format in most computer operating systems and programming designs. The internal format of floating point data is usually stored as 32-bit (floating point type) or 64-bit (double precision type ).
When data is transferred from the database to the development language environment, the data needs to be converted from one format to another. Data conversion may result in loss of data accuracy. Similarly, the process of converting data from one type to another also affects program performance, because a large range of data needs to be converted.
In Oracle 10 Gb, Oracle call interface (Oracle call interface), a column, or PL/SQL variables can all use the binary_float or binary_double data type. In the development environment, such as Java, data types do not need to be converted.
In this process, the speed and accuracy are exchanged. Oracle internal data can accurately store 38 numbers. IEEE 754 floating-point data can only store seven numbers in binary format, and IEEE data also has the problem of "gradual underflow", because binary data is usually repeated numbers. For example, 0.1 is an accurate data in Oracle, but many repeated numbers appear when it is converted to binary.
Scott Stephen has been working in Oracle for 13 years. His research areas include technical support, e-commerce, marketing, and software development.