OBJECT Conversion
We explain some considerations about conversion between ORACLE and ALTIBASE HDB.
DATA TYPES
Types |
ORACLE |
ALTIBASE HDB |
Comments |
---|---|---|---|
CHAR Type |
CHAR |
CHAR |
Maximum-Size 32K |
|
VARCHAR2,VARCHAR |
VARCHAR2, VARCHAR |
Maximum-Size 32K |
|
NCHAR |
NCHAR |
Maximum-Size 16000B(UTF16), Maximum-Size 10666B(UTF8) |
|
NVARCHAR2 |
NVARCHAR |
Maximum-Size 16000B(UTF16), Maximum-Size 10666B(UTF8) |
|
LONG |
CLOB |
Maximum-Size 2G |
LOB Type |
BLOB |
BLOB |
Maximum-Size 2G |
|
CLOB |
CLOB |
Maximum-Size 2G |
|
NCLOB |
CLOB |
Maximum-Size 2G |
NUMERIC Type |
NUMERIC(p, s) |
NUMERIC(p, s) |
We recommend you to use ALTIBASE HDB native data type. Because it reduces overhead during internal data type conversion. |
|
NUMBER (p, s) |
NUMBER(p, s) |
|
|
DECIMAL(p, s) |
DECIMAL(p, s) |
|
|
FLOAT(p), BINARY_FLOAT |
FLOAT(p) |
|
|
SMALLINT |
SMALLINT |
2 byte |
|
INT |
INTEGER |
4 byte |
|
REAL |
REAL |
4 byte |
|
BINARY_DOUBLE |
DOUBLE |
8 byte |
DATE Type |
DATE |
DATE |
ALTIBASE DATE data type can express up to micro-second. (1/1,000,000) |
|
INTERVAL YEAR TO MONTH |
|
No Feature in ALTIBASE HDB. |
|
INTERVAL DAY TO SECOND |
|
|
|
TIMESTAMP WITH TIME ZONE |
|
|
|
TIMESTAMP WITH LOCAL TIME ZONE |
|
|
|
TIMESTAMP |
DATE |
ALTIBASE HDB Date Type and ORACLE TimeStamp(6) are alike. |
BINARY Type |
BFILE |
BLOB |
Maximum-Size 2G |
|
RAW (size) |
BLOB |
|
|
LONG RAW |
BLOB |
|
OBJECT Comparison
ORACLE |
ALTIBASE HDB |
Comments |
---|---|---|
Cluster |
Not Supported |
|
Constraint |
CHECK, REF constraint does not support. |
Among them listed on the left, CHECK constraint will be added |
Database link |
Not Supported |
At ALTIBASE HDB V7, It will be adopted. |
Database trigger |
BEFORE UPDATE and DDL TRIGGER Not Supported |
BEFORE UPDATE functionality will be adopted as a new functionality at ALTIBASE HDB V7. |
Dimension |
Not Supported |
|
External procedure library |
Not Supported |
|
Index-organized table |
Not Supported |
|
Index |
Only supports BTREE, RTREE. BITMAP, CLUSTER, |
A function based index functionality |
Indextype |
Not Supported |
|
JAVA Object |
Not Supported |
|
Materialized view / Materialized view log |
Not Supported |
This functionality will be begun to be supported at ALTIBASE HDB V7. |
Object table |
Not Supported |
|
Object type |
Not Supported |
|
Object view |
Not Supported |
|
Operator |
Not Supported |
|
Package |
Not Supported |
A package functionality will be applied at ALTIBASE HDB V7. |
Sequence |
Supported |
|
Stored Function / Procedure |
Supported |
|
Synonym |
Supported |
|
Table |
Supported |
|
View |
Supported. |
M-View functionalities will be adopted at ALTIBASE HDB V7. |
Context |
Not Supported |
|
Directory |
Supported |
|
Edition |
Not Supported |
|
Restore points |
Not Supported |
|
Profile |
Not Supported |
|
Role |
Not Supported |
|
Rollback Segment |
ALTIBASE HDB has only one UNDO Tablespace. |
iSQL> ALTER TABLESPACE SYS_TBS_DISK_UNDO |
Tablespace |
Supported |
|
User |
Supported |
|
CREATE TABLESPACE
ALTIBASE HDB has two types of tablespace.
They are Memory tablespace and Disk tablespace.
ORACLE's tablespace is disk tablespace.
Therefore, When converting ORACLE to ALTIBASE HDB, user utilizes statement as "CREATE [ DISK ] [ DATA ] TABLESPACE".
The majority of ALTIBASE HDB syntax includes ORACLE syntax.
And ALTIBASE HDB syntax is more simple than ORACLE's one.
First, we explain through example of converting tablespace statement and then explain considerations about tablespace.
DATA TABLESPACE
ORACLE |
ALTIBASE HDB |
Comments |
---|---|---|
BIGFILE|SMALLFILE |
|
Not supported |
DATAFILE file specification |
DATAFILE file specification |
|
MINIMUM EXTENT |
|
Not supported |
BLOCKSIZE |
|
|
LOGGING |
NOLOGGING |
|
FORCE LOGGING |
|
|
DEFAULT STORAGE CLAUSE |
|
|
ONLINE |
OFFLINE |
|
EXTENT MANAGEMENT LOCAL |
DICTIONARY |
|
SEGMENT SPACE MANAGEMENT AUTO|MANUAL |
SEGMENT MANAGEMENT AUTO|MANUAL |
|
FLASHBACK ON|OFF |
|
Not supported |
Example of converting tablespace-statement
ORACLE |
ALTIBASE HDB |
---|---|
CREATE TABLESPACE TESTDATA DATAFILE |
CREATE TABLESPACE TESTDATA DATAFILE |
TEMPORARY TABLESPACE
ORACLE |
ALTIBASE HDB |
Consideration |
---|---|---|
TABLESPACE GROUP |
|
Not supported |
EXTENT MANAGEMENT LOCAL|DICTIONARY |
|
Not supported |
Example of converting temp tablespace statement
ORACLE |
ALTIBASE HDB |
---|---|
CREATE TEMPORARY TABLESPACE tbs_temp_02 |
CREATE TEMPORARY TABLESPACE tbs_temp_02 |
UNDO TABLESPACE
In Altibase, user can not control undo tablespace. (CREATE/DROP)
User only can use "SYS_TBS_DISK_UNDO TABLESPACE".
Alteration operation can be executed by using "ALTER TABLESPACE.." statement.
iSQL> ALTER TABLESPACE SYS_TBS_DISK_UNDO ADD DATAFILE 'undo002.dbf' SIZE 100M;
CREATE TABLE
ALTIBASE doesn't provide objects like "TEMPORARY TABLE, OBJECT TABLE, XMLType TABLE".
But, ALTIBASE provides memory-table.
Therefore, user need to consider which table convert to memory-table.
COLUMN DEFINITION
ORACLE |
ALTIBASE HDB |
Comments |
---|---|---|
SORT |
|
Not supported |
DEFAULT |
DEFAULT |
|
ENCRYPT |
|
Not supported |
Constraint |
Constraint |
ALTIBASE HDB provides constraints except "CHECK" |
Ref Constraint |
|
Not supported |
ORGANIZATION |
|
Not supported |
CLUSTER |
|
|
COMPRESS |
NOCOMPRESS |
SEGMENT ATTRIBUTES
ORACLE |
ALTIBASE HDB |
Comments |
---|---|---|
TABLESPACE |
TABLESPACE |
|
PCTFREE |
PCTFREE |
|
PCTUSED |
PCTUSED |
|
INITRANS |
INITRANS |
|
MAXTRANS |
MAXTRANS |
255=>120 |
LOGGING | NOLOGGING |
LOGGING | NOLOGGING |
|
STORAGE
ORACLE |
ALTIBASE |
Comments |
---|---|---|
INITIAL |
INITEXTENTS |
bytes => The number of extent |
NEXT |
NEXTEXTENTS |
bytes => The number of extent |
MINEXTENTS |
MINEXTENTS |
|
MAXEXTENTS |
MAXEXTENTS |
|
PCTINCREASE |
|
Not supported |
FREELISTS |
|
|
FREELIST |
|
|
OPTIMAL |
|
|
BUFFER POOL |
|
|
LOB STORAGE
ORACLE |
ALTIBASE HDB |
Comments |
---|---|---|
TABLESPACE |
TABLESPACE |
|
STORAGE |
|
Not supported |
CHUNK |
|
Not supported |
PCTVERSION |
|
Not supported |
RETENTION |
|
Not supported |
FREEPOOLS |
|
Not supported |
CACHE |
|
Not supported |
STORAGE IN ROW |
|
Not supported |
LOGGING| NOLOGGING |
LOGGING| NOLOGGING |
|
TABLE PARTITIONING
ORACLE |
ALTIBASE HDB |
Comments |
---|---|---|
PARTITION BY RANGE |
PARTITION BY RANGE |
|
PARTITION BY HASH |
PARTITION BY HASH |
|
PARTITION BY LIST |
PARTITION BY LIST |
|
Composite partitioning 구문 |
|
Not supported |
TABLE PROPERTIES
ORACLE |
ALTIBASE HDB |
Comments |
---|---|---|
ENABLE|DISABLE ROW MOVEMENT |
ENABLE|DISABLE ROW MOVEMENT |
Only Partitioned TABLE |
NOPARALLEL| PARALLEL |
NOPARALLEL| PARALLEL |
|
ENABLE|DISABLE VALIDATE|NOVALIDATE |
|
Not supported |
Example of converting "CREATE TABLE" statement
ORACLE |
ALTIBASE HDB |
---|---|
CREATE TABLE "SCOTT"."EMP" ("EMPNO" NUMBER(4,0), |
CREATE TABLE "SCOTT"."EMP" ("EMPNO" NUMBER(4,0), |
CREATE INDEX
ORACLE |
ALTIBASE HDB |
Comments |
---|---|---|
TABLESPACE |
TABLESPACE |
|
LOGGING|NOLOGGING |
LOGGING|NOLOGGING |
|
NOPARALLEL|PARALLEL |
NOPARALLEL|PARALLEL |
|
COMPUTE STATISTICS |
|
|
REVERSE |
|
Not Supported |
SORT |
NOSORT |
Not Supported |
ONLINE |
|
Not Supported |
COMPRESS |
NOCOMPRESS |
Not Supported |
PCTFREE, PCTUSED |
|
Not Supported |
INITRANS |
INITRANS |
|
MAXTRANS |
MAXTRANS |
|
Storage Clause |
|
|
Example of converting index-statement
ORACLE |
ALTIBASE HDB |
---|---|
CREATE INDEX "SCOTT"."EMP_IDX1" |
CREATE INDEX "SCOTT"."EMP_IDX1" |
CREATE VIEW
ORACLE |
ALTIBASE HDB |
Comments |
---|---|---|
WITH READ ONLY |
WITH READ ONLY |
ALTIBASE HDB only supports WITH READ ONLY clause. |
[NO] FORCE |
|
|
WITH CHECK OPTION |
|
Not supported |
XMLType view |
|
Not supported |
Object view |
|
Not supported |
CREATE TRIGGER
ORACLE |
ALTIBASE |
Comments |
---|---|---|
CREATE OR REPLACE TRIGGER |
CREATE TRIGGER |
|
BEFORE|AFTER| INSTEAD OF |
BEFORE|AFTER |
ALTIBASE HDB have begun to support "before trigger" functionality at Version 6. |
DML Event |
DML Event |
ALTIBASE doesn't support more than one event with "OR". |
DDL Event |
|
Not supported |
WHEN Conditions |
WHEN Conditions |
|
FOR EACH ROW |
FOR EACH ROW |
|
REFERENCING |
REFERENCING |
DELETE event can't refer a "NEW" and INSERT-event can't refer "OLD" |
Trigger body |
Trigger body |
ALTIBASE Trigger body have to start "AS BEGIN" and |
CREATE SEQUENCE
- ALTIBASE HDB doesn't support "ORDER, NOORDER".
- A sequence has a range between -9223372036854775807 and 9223372036854775806 in ALTIBASE HDB.
CREATE SYNONYM
It's similar to ORACLE.
.