Column type differences between databases

The column types listed in this information center show the WebSphere Commerce database schema for DB2 for workstations. The following table provides equivalent column types for operating systems and databases supported by WebSphere Commerce.

JDBC Object DB2 Cloudscape Oracle WebSphere Commerce size limitation in bytes
AIXLinuxSun Solaris Operating EnvironmentWindows i5/OSiSeries
zSeries AIXSun Solaris Operating EnvironmentWindows
Long BIGINT BIGINT DECIMAL BIGINT NUMBER

9,223,372 x 1012

Hashtable BLOB() BLOB() BLOB() LONG VARBINARY BLOB 4 GB
String CHAR() GRAPHIC() CCSID 13488 CHAR() CHAR() VARCHAR() 254
byte[] CHAR() FOR BIT DATA CHAR() FOR BIT DATA CHAR() FOR BIT DATA BIT() RAW() 32,673
String CLOB() DBCLOB() CCSID 13488 CLOB() LONG VARCHAR CLOB DB21 GB Oracle4 GB
BigDecimal DECIMAL(,) DECIMAL(,) DECIMAL(,) DECIMAL(,) DECIMAL(,) -
Double FLOAT FLOAT FLOAT FLOAT NUMBER -
Integer INTEGER INTEGER INTEGER INTEGER INTEGER 2,147,483,647
Timestamp TIMESTAMP TIMESTAMP TIMESTAMP TIMESTAMP TIMESTAMP (9i) -
String VARCHAR() VARGRAPHIC() CCSID 13488 VARCHAR() VARCHAR() VARCHAR() 32,672
Notes:
  1. In the CATENTDESC table, the AUXDESCRIPTION2 field is VARGRAPHIC(3000) ALLOCATE() CCSID 13488.

  2. As a result of inconsistent rates of success for when the Oracle JDBC driver handles information that is of the LONG data type, it is recommended that you avoid using the LONG data type whenever possible. The most commonly reported error in this situation is the "Stream has already been closed" error.

  3. If you must use this datatype, you can only have one column per database table that uses the LONG type. In addition, when constructing a select statement, do not put the LONG column as either the first or last element in the select. Another workaround for operations under a heavy load is to avoid mapping this particular column to a CMP field in an entity bean. Instead, use a session bean to perform retrieves and updates on this column.

Feedback