Conversion of Oracle Data Types to Kognitio

advertisement
Oracle to Kognitio Data Type Conversion
Oracle
Kognitio Data
Kognitio
Description and KOGNITIO notes
Data Type
Type
Storage
BFILE
Not Supported
BLOB
Not Supported
CHAR,
CHAR(size)
Number of Fixed length character String having maximum size in bytes.
NCHAR
NCHAR(size)
bytes
You must specify size.
specified
Max size in Kognitio is 32000 bytes. (Please note, this may be less than 32000
characters for non-LATIN1 character sets).
In Kognitio, NCHAR is equivalent to utf32
CLOB
Not Supported
DATE
DATE or
4 bytes,
The Oracle DATE datatype is effectively a TIMESTAMP.
TIMESTAMP
8 bytes
In Kognitio, a DATE value consists of the fields YEAR, MONTH and DAY and has a
permitted range of 0001-01-01 (January 1st 1AD) to 9999-12-31 (December 31st
9999AD) (Gregorian calendar).
TIMESTAMP detail – see below
FLOAT
FLOAT
8 bytes
-1.797693134862315708 e 308 <= FLOAT/DOUBLE <= 1.797693134862315708 e 308
INTEGER
TINYINT,
1 byte,
INT1 or TINYINT: -128 <= INT1 <= 127; one byte of storage
SMALLINT,
2 bytes,
INT2 or SMALLINT: -32768 <= INT2 <= 32767; two bytes of storage
INTEGER,
4 bytes,
INT4 or INT or INTEGER: -2147483648 <= INT4 <= 2147483647; four bytes of storage
BIGINT
8 bytes
INT8 or BIGINT: -9223372036854775808 <= INT8 <= 9223372036854775807; eight bytes of storage
Where in Oracle, NUMBER is used with no decimal precision {e.g. NUMBER(4,0),
NUMBER(9,0)}, please use the appropriate INTEGER type rather than decimal
LONG
Not Supported
LONG RAW
Not Supported
NCLOB
Not Supported
NUMBER
DECIMAL,
REAL=4
REAL
bytes
DECIMAL Decimal precision ranges from 1 to 18. Where the precision is between 1 and 9,
= 4 or 8 storage takes up 4 bytes. Where the precision is between 10 and 18, storage takes
up 8 bytes.
bytes
Oracle NUMBER data types requiring a precision range of greater than 18 will require
the use of REAL or FLOAT in Kognitio.
REAL = -3.40282346638528860 e 38 <= REAL <= 3.40282346638528860 e 38.
When using REAL or FLOAT as an equivalent for NUMBER, please note that you may
see some issues due to values not being stored exactly, so this is likely to be
inappropriate for certain details e.g. financial calculations.
RAW
Not Supported
TIMESTAMP
TIMESTAMP
8 bytes
A TIMESTAMP value consists of the fields YEAR, MONTH, DAY, HOUR, MINUTE and
SECOND. TIMESTAMP declarations can be followed by an optional unsigned integer,
in parenthesis, that gives the fractional precision for the SECOND field.
All times are held in the KOGNITIO in Universal Coordinated Time (UTC).
INTERVAL
INTERVAL
8 bytes
XML Type
Not Supported
VARCHAR2
VARCHAR(size)
VARCHAR
NVARCHAR(size)
Variable.
Variable length character String having maximum size in bytes. You must specify
size. VARCHAR is now deprecated in Oracle.
NVARCHAR
VARCHARS are stored as two four-byte fields followed by the data (e.g. a field with a
NVARCHAR2
25 character string will use 33 bytes of storage, 2 x 4 byte fields plus 25 bytes).
(This calculation assumes use of the LATIN1 character set).
Max size in KOGNITIO is 32000 bytes. (Please note, this may be less than 32000
characters for non-LATIN1 character sets).
In Kognitio, NVARCHAR is equivalent to utf8.
TIME
4 bytes
A TIME value can consist of the fields HOUR, MINUTE and SECOND. TIME
declarations can be followed by an optional unsigned integer, in parenthesis, that
gives the fractional precision for the SECOND field
For further details about KOGNITIO data types, please refer to the Kognitio SQL Guide.
Download