Oracle and DB2, Comparison and Compatibility/Storage Model/Data Types/Oracle

Oracle edit

Character Data Types

VARCHAR and LONG are deprecated and exist for backward compatibility only. Currently, VARCHAR is a synonym for VARCHAR2 but this may change in the future. CLOB and NCLOB should be used in new applications instead of LONG.

Numeric Data Types
Date Data Types

You can verify the database and session time zones by querying the built-in SQL functions DBTIMEZONE and SESSIONTIMEZONE. If the database time zone or the session time zone has not been set manually, Oracle Database uses the operating system time zone

LOB Data Types
RAW Data Types

Both RAW and LONG RAW are used for data that is not interpreted by the database binary data and byte strings, LONG RAW is (or rather was) for large binary objects – for the storage of Audio, Video. Support for these type of Large Objects (LOBs) has improved considerably from the first implementations of LONG RAW, with different data types specific for LOBs such as unstructured binary data, unstructured character data, Unicode character data, and LOBs stored externally to the Oracle file system. The LONG RAW data type is for backward compatibility with existing applications. For new applications that need to store large amounts of binary data the BLOB and BFILE data types should be used. It is also recommended that LONG RAW columns are converted to LOB columns. LOB functionality is enhanced for every release, but because it is for backward compatibility only, LONG RAW is static.

ROWID Data Types

Physical ROWIDS store row addresses for regular tables, clustered tables, table partitions and sub partitions, indexes, index partitions and subpartitions. Logical ROWIDS store row addresses for index-organized tables.