Skip to end of metadata
Go to start of metadata

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
This column is displayed as VARCHAR after the execution of "desc table" command in ALTIBASE HDB.

 

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.
SMALLINT, INTEGER, BIGINT, REAL, DOUBLE data types belong to the native data type ALTIBASE HDB supports.

 

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
as a new functionality at ALTIBASE HDB V7.

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,
Function based, Domain, Global partitioned INDEX Not Supported

A function based index functionality
will be adopted at ALTIBASE HDB V7.
In addition, A global partitioned index is the same.

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.
But M-View, Updatable-view Not 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.
User can't control undo tablespace
except an ALTER operation.(CREATE / DROP).

iSQL> ALTER TABLESPACE SYS_TBS_DISK_UNDO
ADD DATAFILE 'undo002.dbf' SIZE 100M;

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
'testdata01.dbf'
SIZE 1024M AUTOEXTEND ON NEXT 50M MAXSIZE UNLIMITED
LOGGING ONLINE EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT MANUAL FLASHBACK ON

CREATE TABLESPACE TESTDATA DATAFILE
'testdata01.dbf'
SIZE 1024M AUTOEXTEND ON NEXT 50M MAXSIZE UNLIMITED
SEGMENT MANAGEMENT MANUAL

Icon

SEGMENT MANAGEMENT MANUAL
convert SEGMENT phase to SEGMENT MANAGEMENT AUTO|MANUAL and other phase is not supported

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
TEMPFILE 'temp02.dbf' SIZE 5M AUTOEXTEND ON
TABLESPACE GROUP tbs_grp_01

CREATE TEMPORARY TABLESPACE tbs_temp_02
TEMPFILE 'temp02.dbf' SIZE 5M AUTOEXTEND ON


Icon

TABLESPACE GROUP Not supported

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"
A Check Constraint will be adopted as a new functionality at ALTIBASE HDB V7.

Ref Constraint

 

Not supported

ORGANIZATION

 

Not supported

CLUSTER

 

 

COMPRESS

NOCOMPRESS


Icon

When defining PRIMARY KEY, UNIQUE Constraint, user have to use "USING INDEX" phase.
When defining index-attibutes, user can use only "TABLESPACE, PARALLEL/NOPARALLEL , LOGGING/NOLOGGING" phase.

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),
"ENAME" VARCHAR2(10 BYTE),
"JOB" VARCHAR2(9 BYTE), "MGR" NUMBER(4,0),
"HIREDATE" DATE, "SAL" NUMBER(7,2), "COMM" NUMBER(7,2),
"DEPTNO" NUMBER(2,0), CONSTRAINT "PK_EMP"
PRIMARY KEY ("EMPNO") USING INDEX
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE (INITIAL 65536 NEXT 1048576 MINEXTENTS 1
MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1
FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ENABLE,
CONSTRAINT "FK_DEPTNO" FOREIGN KEY ("DEPTNO")
REFERENCES "SCOTT"."DEPT" ("DEPTNO") ENABLE )
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEXT 1048576
MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0
FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ;

CREATE TABLE "SCOTT"."EMP" ("EMPNO" NUMBER(4,0),
"ENAME" VARCHAR2(10), "JOB" VARCHAR2(9), "MGR"
NUMBER(4,0), "HIREDATE" DATE, "SAL" NUMBER(7,2),
"COMM" NUMBER(7,2), "DEPTNO" NUMBER(2,0),
CONSTRAINT "PK_EMP" PRIMARY KEY ("EMPNO")
USING INDEX TABLESPACE "USERS" , CONSTRAINT "FK_DEPTNO"
FOREIGN KEY ("DEPTNO") REFERENCES "SCOTT"."DEPT" ("DEPTNO") )
TABLESPACE "USERS" PCTFREE 10 PCTUSED 40 INITRANS 1
MAXTRANS 120 STORAGE (INITEXTENTS 1 NEXTEXTENTS 1 MINEXTENTS
1 MAXEXTENTS 2147483645) LOGGING ;

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"
ON "SCOTT"."EMP" ("DEPTNO", "SAL")
PCTFREE 10 INITRANS 2 MAXTRANS 255
COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576
 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1
FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ;

CREATE INDEX "SCOTT"."EMP_IDX1"
ON "SCOTT"."EMP" ("DEPTNO", "SAL")
TABLESPACE "USERS"
INITRANS 2 MAXTRANS 30
STORAGE(INITEXTENTS 1 NEXTEXTENTS 1
MINEXTENTS 1 MAXEXTENTS 2147483645) ;

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. 
Before trigger functionality will be applied to ALTIBASE HDB V7.

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
:old (x) -> old(o)

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.

.

  • No labels
Page: Tablespace Page: User Page: Table Page: Constraint Page: Index Page: View Page: Sequence Page: Trigger Page: Directory Page: Synonym Page: Foreign Key