2. DBMS이야기/04. CUBRID

[CUBRID] SQL 타입별 비교 (CUBRID, MySQL, Oracle)

OSSW(Open Source System SoftWare 2014. 9. 23. 15:08

 

CUBRID 8.4.1 vs MySQL 5.5.27 vs ORACLE 10g 에 대한 SQL 관련 정보들을 비교한 자료 입니다.

 

 

[DBMS 데이터 타입 비교]

 

구분

CUBRID

MySQL

Oracle

수치형

-

-

BINARY_FLOAT

BIGINT

BIGINT

-

NUMERIC(20)

DECIMAL

DECIMAL

DECIMAL

DOUBLE

DOUBLE

BINARY_DOUBLE

DOUBLE PRECISION

DOUBLE PRECISION

-

FLOAT

FLOAT

FLOAT

INT

MEDIUMINT

-

INT, INTEGER

SMALLINT

INTEGER

INTEGER

-

MONETARY

-

-

NUMERIC(p, s)

-

NUMBER(p, s)

NUMERIC(38, 0)

-

NUMBER(p,0)

NUMERIC(38, 15)

-

NUMBER

NUMERIC(M,D)

FLOAT(M,D) or REAL(M,D)

-

REAL

-

-

SHORT

-

-

SMALLINT

BIT(1) (>MySQL-5.0)

-

BOOL, BOOLEAN

TINYINT

SMALLINT[(M)]

비트열

BIT VARYING (1073741823)

LONGBLOB

BLOB

LONG RAW

BIT VARYING(16277215)

MEDIUMBLOB

 

BIT VARYING(255)

TINYBLOB

-

BIT VARYING(65535)

BLOB

-

BIT(n)

BIT( > 1) (>MySQL-5.0)

-

BITVARYING(n)

BINARY(M)

RAW(n)

VARBINARY(M)

날짜/시간

DATE

DATE

DATE

: MM/DD/YYYY

: YYYY-MM-DD

: YY/MM/DD

DATETIME

DATETIME

TIMESTAMP

: YYYY-MM-DD HH:MI:SS.FFF

: YYYY-MM-DD HH:MI:SS

TIMESTAMP WITH LOCAL TIMESTAMP WITH TIME ZONE

 

 

: YY/MM/DD HH:MI:SS.FFFF

TIME

TIME

-

: HH:MI:SS

: HH:MI:SS

TIMESTAMP

TIMESTAMP

TIMESTAMP

: YYYY-MM-DD HH:MI:SS

: YYYY-MM-DD HH:MI:SS

: YY/MM/DD HH:MI:SS.FFFFFFFFF

-

YEAR[(2|4)]

-

: YYYY

문자열

CHAR

CHAR

CHAR

NCHAR VARYING

-

-

NCHAR

-

NCHAR

VARCHAR(16277215)

MEDIUMTEXT

-

VARCHAR(255)

TINYTEXT

INTERVAL DAY TO SECOND

VARCHAR(255)

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

INTERVAL YEAR TO MONTH

VARCHAR(64)

-

ROWID

VARCHAR(64)

-

UROWID

VARCHAR(65535)

TEXT

-

VARCHAR

VARCHAR

NVARCHAR2

VARCHAR2

BLOB

BLOB

BLOB

BLOB

/CLOB

CLOB

-

CLOB

집합형

SET(VARCHAR(255))

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

-

MULTISET

-

-

LIST

-

-

SEQUENCE

-

-

STRING

LONGTEXT

CLOB

-

-

LONG

-

-

NCLOB

 

 

 

 

[MySQL to CUBRID 마이그레이션 시 권장하는 데이터 타입 맵핑 테이블]

 

 

Date Types in MySQL

Date Types in CUBRID

BIT(1) (>MySQL-5.0)

SMALLINT

BIT( > 1) (>MySQL-5.0)

BIT(n)

TINYINT

SMALLINT

BOOL, BOOLEAN

SMALLINT

SMALLINT[(M)]

SMALLINT

INT

MEDIUMINT[(M)]

INT

INT, INTEGER[(M)]

INT

BIGINT

BIGINT[(M)]

BIGINT

NUMERIC(20)

FLOAT[(M,D)]

FLOAT

DOUBLE[(M,B)]

DOUBLE

DECIMAL[(M[,D])]

DOUBLE

DATE

DATE

DATETIME

DATETIME

TIMESTAMP[(M)]

TIMESTAMP

TIME

TIME

YEAR[(2|4)]

CHAR(4)

CHAR(M)

CHAR(n)

VARCHAR(M) [BINARY]

VARCHAR(n)

BINARY(M)

BIT VARYING(n)

VARBINARY(M)

BIT VARYING(n)

TINYBLOB

BIT VARYING(255)

TINYTEXT

VARCHAR(255)

BLOB

BIT VARYING(65535)

TEXT

VARCHAR(65535)

MEDIUMBLOB

BIT VARYING(16277215)

MEDIUMTEXT

VARCHAR(16277215)

LONGBLOB

BIT VARYING (1073741823)

LONGTEXT

STRING

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

VARCHAR(255)

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

SET(VARCHAR(255))

FLOAT(M,D) or REAL(M,D) or DOUBLE PRECISION(M,D)

NUMERIC(M,D)

 

 

 

[ORACLE to CUBRID 마이그레이션 시 권장하는 데이터 타입 맵핑 테이블]

 

Date Types in Oracle

Date Types in CUBRID

BINARY_DOUBLE

DOUBLE

BINARY_FLOAT

FLOAT

BLOB

BIT VARYING (1073741823)

CHAR(n)

CHAR(n)

CLOB

STRING

DATE

DATE

DECIMAL(p, s)

NUMERIC(p, s)

FLOAT

FLOAT

INTERVAL DAY TO SECOND

VARCHAR(255)

INTERVAL YEAR TO MONTH

VARCHAR(255)

LONG

STRING

LONG RAW

BIT VARYING (1073741823)

NCHAR(n)

CHAR(n)

NCLOB

STRING

NUMBER(p, s)

NUMERIC(p, s)

NUMBER

NUMERIC(38, 15)

NUMBER(p,0)

NUMERIC(38, 0)

NVARCHAR2(n)

VARCHAR(n)

RAW(n)

BIT VARYING(n)

ROWID

VARCHAR(64)

TIMESTAMP

DATETIME

TIMESTAMP WITH LOCAL TIME ZONE

DATETIME

TIMESTAMP WITH TIME ZONE

DATETIME

UROWID

VARCHAR(64)

VARCHAR2(n)

VARCHAR(n)

 

 

출처:http://www.cubrid.com

 

Posted by 김득은