Mapping SQL types to PBL

This sections explains how JDBC/SQL types map to PBL types when cataloging SQL queries.

JDBC column types to PBL types

JDBC column types are mapped to PBL types as defined in the following table:
JDBC Type PBL Type
CHAR String
LONGVARCHAR String
VARCHAR String
CLOB String
TIME Time
DATE Time
TIMESTAMP Time
BIT Bool
TINYINT Int(8)
SMALLINT Int(16)
INTEGER Int
BIGINT Int(64)
NUMERIC Decimal
DECIMAL Decimal
FLOAT Real(32)
DOUBLE Real
REAL Real
BINARY Binary
LONGBINARY Binary
VARBINARY Binary
BLOB Binary
OTHER Java.Lang.Object
Some database provide non standard column types. The following table shows how vendor-specific types map to PBL types:
DB Vendor Vendor Type JDBC Type PBL Type
MS-SQL NVARCHAR VARCHAR String
MS-SQL NCHAR CHAR String
MS-SQL NTEXT CHAR String
DB2 CHARACTER CHAR String
Oracle DATE DATE or TIMESTAMP Time
Oracle DATEs can store dates with or without the time component. The type mapping depends on the Use Timestamp for Date columns option on the External Resource configuration.