Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

CUBRID Migration Toolkit Concepts


2 Concepts

2.1 CMT

CMT is the abbreviation of CUBRID Migration Toolkit.

CMT includes two parts, one is an application with GUI and another is a console tool.

2.1.1 CMT GUI

CMT GUI can provide some graphic user interfaces to help users finish their migration work.

 

2.1.2 CMT Console Tool

CMT Console Tool tool can run in linux and windows with command line.

Because of no GUI, it has better performace then CMT GUI.

It helps users finish migration work in some OS without GUI.


2-1-2.png

2.2 CUBRID UnloadDB File

Text files that can be loaded into offline CUBRID database by CUBRID loaddb command.

2.3 Migration Script

Migration script is a very important concept in CMT.

Migration scripts are written with XML format. A migration script lets the CMT know how to connect source/target databases and how to transform source DB objects to target DB objects during a migration process.

Migration scripts are created by migration wizard.

2.4 Migration Script Explorer

Migration script explorer is a view which is on the left part by default when CMT GUI is started.

All migration scripts will be listed in this explorer, users can edit the scripts by this explorer.


2-4.png

All that users can do with scripts are as follows:

Open with wizard: Open a migration wizard, the settings in the wizard is according to the selected migration script.

Rename: Rename the selected migration script.

Delete: Delete selected migration script.

Copy: Make a copy of current selected migration script.

Import: Import an external migration script file to list.

Export: Save selected migration script to an external XML file.

Execution History: If the migration script was set to a migration resveration, users can view this migration script’s starting histories.

Cancel Reservation: Cancel the migration reservation settings of selected migration script.

2.5 Migration Wizard

Migration wizard is a GUI wizard to help users build a migration script step by step.

The first setp is selection migration type and all pages followed will be decided by the selections in the first step.


At the last step of a migration wizard, a migration script will be created or updated and a migration process will start after clicking the Start button.

Users can monitor the migration’s progress when migration is running and view the migration report after migration is finished.

  

2.6 Migration Progress Monitor

If migration is started, users can monitor the migration progress by migration progress monitor.

Users can read how many records were exported and imported, what error was thrown and how much time was cost from migration progress monitor.

Users can also stop the migration process by clicking Stop button, and when the migration is finished the View Report button will be enabled and users can open the report view by clicking this button.


2-7-1.png

2.7 Migration Report

When migration was finished or interrupted, migration engine will generate a migration report and save it into a local file. Users can review the report by Migration History Manager.

The report includes a lot of information about this migration such as which table was created successfully/failed, how many records were exported and how many records were imported and the error logs during migration process.

Different data source may have different report UI.

Migration report

SQL importing report

CSV importing report

2.8 Migration Task Reservation

If users want start a migration process at a specific time, not now, migration task reservation can do this.

Users can make the migration process start at a specific time or at a specific time every day or at a specific time with UNIX Cron pattern.

At the last step of migration wizard, when users click the “Start” button, a dialog will be popped: 

Users also can choose button “Reservation” to add current migration task to reservation list.

2.9 Migration History Manager

Every migration work generated a migration report and the report was saved at local.

Migration History manager lists the old migration reports and allows users to review the reports.

Users can delete the migration histories.

And users can import an external migration report file into history list and open it.

This is often used for checking a migration report generated by CMT console tool.

Users also can open a migration wizard by a migration history.



2.10 Data Type Mapping

Different databases have different data type definitions, so if we want do migration work between different database systems, we should build a data type mapping to let the CMT know how to transform the schemas and data from source database to target database. For example: The string definition is “varhcar2” in Oracle but “varchar” in CUBRID, so we should build a mapping between “varchar2” and “varchar”.

CMT provides a default data type mapping in the preference:

MySQL to CUBRID data type mapping

MySQL Type Name

Return value of JDBC

CUBRID Type

BIT(1) (new in MySQL-5.0)

BIT

Smallint

BIT( > 1) (new in MySQL-5.0)

BIT

Bit(n)

TINYINT

TINYINT

Smallint

BOOL, BOOLEAN

TINYINT

Smallint

SMALLINT<(M)>

<UNSIGNED>

SMALLINT 

<UNSIGNED>

Smallint

Integer

MEDIUMINT<(M)>

<UNSIGNED>

MEDIUMINT 

<UNSIGNED>

Integer

INT,INTEGER<(M)> 

<UNSIGNED>

INTEGER 

<UNSIGNED>

Integer

Bigint

BIGINT<(M)> 

<UNSIGNED>

BIGINT 

<UNSIGNED>

Bigint

Numeric(20)

FLOAT<(M,D)>

FLOAT

FLOAT

DOUBLE<(M,B)>

DOUBLE

DOUBLE

DECIMAL<(M<,D>)>

DECIMAL

DOUBLE

DATE

DATE

DATE

DATETIME

DATETIME

DATETIME

TIMESTAMP<(M)>

TIMESTAMP

TIMESTAMP

TIME

TIME

TIME

YEAR<(2|4)>

YEAR

Char(4)

CHAR(M)

CHAR

Char(n)

VARCHAR(M) <BINARY>

VARCHAR

Varchar(n)

BINARY(M)

BINARY

Bit Varying(n)

VARBINARY(M)

VARBINARY

Bit Varying(n)

TINYBLOB

TINYBLOB

Bit Varying(255)

Blob

TINYTEXT

VARCHAR

Varchar(255)

BLOB

BLOB

Bit Varying(65535)

TEXT

VARCHAR

Varchar(65535)

Clob

MEDIUMBLOB

MEDIUMBLOB

Bit Varying(16277215)

Blob

MEDIUMTEXT

VARCHAR

Varchar(16277215)

Clob

LONGBLOB

LONGBLOB

Bit Varying(1073741823)

Blob

LONGTEXT

VARCHAR

Varchar(1073741823)

Clob

ENUM('value1','value2',...)

CHAR

Varchar(255)

SET('value1','value2',...)

CHAR

SET( Varchar(255) )

Boolean Type

CUBRID does not have a Boolean type. Statements containing Boolean values are transformed by CMT to replace the value with conditional expressions. CMT emulates stored Boolean data by using the CUBRID smallint type.

Character Data Types

CMT converts the basic character types VARCHAR2 and CHAR to CUBRID varchar and char, correspondingly preserving their length. If it is MySQL longtext which has a constant size greater than 1,073,741,823, CMT maps to varchar(1073741823).

If target CUBRID database is specified to access by “UTF-8” charset, varchar or char size would be specified size multi 3. For example, if source MySQL data type is char(255), then the target CUBRID data type is char(765). If target CUBRID database is specified to access by “Unicode” charset or other not “UTF-8” charset, varchar or char size would be specified size multi 2.

Date and Time

CUBRID does not has year data type, so CMT maps year(2|4) to char(4).

 

Oracle to CUBRID data type mapping

Oracle Type Name

Return value of JDBC

CUBRID Type

Bfile

InputSteam

Blob

Binary_double

Double

Double

Binary_float

Float

Float

Blob

Blob

Blob

Char(n)

String

Character(n)

Decimal(p,s)

BigDecimal

Numeric(p,s)

Float

Float

Float

Interval day to second

String

Character varying(255)

Interval year to month

String

Character varying(255)

Long

String

Clob

Long raw

Byte[]

Bit varying(1073741823)

Blob

NChar(n)

String

Character(n)

Nclob

Clob

Character varying(1073741823)

Number(p,s)

getBigDecimal

Numeric(p,s)

Number(,0)

getBigDecimal

Numeric(38,0)

Number

getBigDecimal

Numeric(38,0)

Nvarchar2(n)

String

Character varying(n)

Raw(n)

Byte[]

Bit Varying(n)

Rowid

Rowid

Character varying(64)

Timestamp

Timestamp

Timestamp

Timestamp with local time zone

Timestamp

Timestamp

Timestamp with time zone

Timestamp

Timestamp

Urowid

Rowid

Character varying(64)

Varchar2(n)

String

Character varying(n)

 

Character Data Types

CMT converts the basic character types VARCHAR2 and CHAR to CUBRID varchar and char, correspondingly preserving their length. If it is Oracle Long type which has a constant size greater than 1,073,741,823, CMT maps to varchar(1073741823).

If target CUBRID database is specified to access by “UTF-8” charset, varchar or char size would be specified size multi 3. For example, if source Oracle data type is char(255), then the target CUBRID data type is char(765). If target CUBRID database is specified to access by “Unicode” charset or other not “UTF-8” charset, varchar or char size would be specified size multi 2.

Date and Time

CUBRID doesn’t have "Timestamp with local time zone" and "Timestamp with time zone" types, so time zone information may be lost.

CUBRID doesn’t have "Interval day to second" and "Interval year to month", so map them to "Character varying(255)"

 

CUBRID to CUBRID data type mapping

CUBRID Type Name

Return value of JDBC

CUBRID Type

Bigint

BIGINT

Bigint

Bit(n)

BINARY

Bit(n)

Bit varying(n)

VARBINARY

Bit varying(n)

blob

VARBINARY

Blob

Character(n)

CHAR

Character(n)

Character varying(n)

VARCHAR

Character varying(n)

clob

VARCHAR

Clob

Date

DATE

Date

Datetime

TIMESTAMP

Datetime

Double

DOUBLE

Double

Float

REAL

Float

Glo

Object

Glo

Integer

INTEGER

Integer

Monetary

DECIMAL

Monetary

Set_of(data type)

ARRAY

Set_of(data type)

Multiset_of(data type)

ARRAY

Multiset_of(data type)

Sequence_of(data type)

ARRAY

Sequence_of(data type)

National character(n)

CHAR

National character(n)

National character varying(n)

VARCHAR

National character varying(n)

Numeric(p,s)

NUMERIC

Numeric(p,s)

Smallint

SMALLINT

Smallint

Time

TIME

Time

Timestamp

TIMESTAMP

Timestamp   

 

2.11 Bug reporter

Users can report bugs during using CMT if users have connected with internet.


2-13-1.png

 

 

2.12 Notice Dashboard

 

Users can get some news about CUBRID and CUBRID Tools from this view.

2-15-1.png

 

 

Go back

comments powered by Disqus
Page info
viewed 532 times
translations en
Author
posted 5 months ago by
kevinlin79
Contributors
updated last week by
View revisions
tagged
Share this article