Open Source RDBMS - Seamless, Scalable, Stable and Free

English | Login |Register

CUBRID vs. MySQL vs. Oracle
Data Type Mapping

Since each database management system has its own SQL syntax and data type conventions, it is sometimes overwhelming to figure out which data type in one database system would be the best equivalent of a certain data type in another. To make it easier for developers and DBAs to develop applications for CUBRID, we decided to create a table of Data Types comparison for MySQL, CUBRID, and Oracle.

Below you can see the recommended data type equivalents you can use when developing applications for CUBRID. This data type mapping also represents the default settings used in the CUBRID Migration Toolkit (CMT), a software tool which allows users to migrate databases form MySQL or Oracle to CUBRID. To accelerate the development, it is highly recommended to take advantage of CMT which supports custom data type configurations you might want to specifically set for your web application.

Date Types in MySQL Date Types in CUBRID Date Types in Oracle Date Types in CUBRID
BIT(1) (>MySQL-5.0) SMALLINT BINARY_DOUBLE DOUBLE
BIT( > 1) (>MySQL-5.0) BIT(n) BINARY_FLOAT FLOAT
TINYINT SMALLINT BLOB BIT VARYING (1073741823)
BOOL, BOOLEAN SMALLINT CHAR(n) CHAR(n)
SMALLINT[(M)]
[UNSIGNED]
SMALLINT
INT
CLOB STRING
MEDIUMINT[(M)]
[UNSIGNED]
INT
INT
DATE DATE
INT, INTEGER[(M)]
[UNSIGNED]
INT
BIGINT
DECIMAL(p, s) NUMERIC(p, s)
BIGINT[(M)]
[UNSIGNED]
BIGINT
NUMERIC(20)
FLOAT FLOAT
FLOAT[(M,D)] FLOAT INTERVAL DAY TO SECOND VARCHAR(255)
DOUBLE[(M,B)] DOUBLE INTERVAL YEAR TO MONTH VARCHAR(255)
DECIMAL[(M[,D])] DECIMAL
DOUBLE
LONG STRING
DATE DATE LONG RAW BIT VARYING (1073741823)
DATETIME DATETIME NCHAR(n) CHAR(n)
TIMESTAMP[(M)] TIMESTAMP NCLOB STRING
TIME TIME NUMBER(p, s) NUMERIC(p, s)
YEAR[(2|4)] CHAR(4) NUMBER NUMERIC(38, 15)
CHAR(M) CHAR(n) NUMBER(p,0) NUMERIC(38, 0)
VARCHAR(M) [BINARY] VARCHAR(n) NVARCHAR2(n) VARCHAR(n)
BINARY(M) BIT VARYING(n) RAW(n) BIT VARYING(n)
VARBINARY(M) BIT VARYING(n) ROWID VARCHAR(64)
TINYBLOB BIT VARYING(255) TIMESTAMP DATETIME
TINYTEXT VARCHAR(255) TIMESTAMP WITH LOCAL TIME ZONE DATETIME
BLOB BIT VARYING(65535) TIMESTAMP WITH TIME ZONE DATETIME
TEXT VARCHAR(65535) UROWID VARCHAR(64)
MEDIUMBLOB BIT VARYING(16277215) VARCHAR2(n) VARCHAR(n)
MEDIUMTEXT VARCHAR(16277215)
LONGBLOB BIT VARYING (1073741823)
LONGTEXT STRING
ENUM('value1', 'value2',...) ENUM('value1', 'value2',...)
SET('value1', 'value2',...) SET(VARCHAR(255))
FLOAT(M,D) or REAL(M,D) or DOUBLE PRECISION(M,D) NUMERIC(M,D)

Note: These data type mapping recommendations are based on CUBRID 3.0. Later versions may have additional new data types which would allow users to leave the source data type unchanged.

See also

See also

Install CUBRID with AutoSet

AutoSet is a software bundle for Windows, which provides seamless installation of Apache, PHP, MySQL, CUBRID, and Subversion. It is distributed und...




You are either using a very old browser or a browser that is not supported.
In order to browse cubrid.org you need to have one of the following browsers:



Internet Explorer: Mozilla Firefox: Google Chrome: