Data Type Mappings
This section describes how database data types are mapped to XML schema data types for supported databases:
DB2
Table E-1 describes how DB2 data types are mapped to XML schema data types for DataDirect XQuery. Any DB2 data type that is not listed is not supported by DataDirect XQuery.
Table E-1. DB2 Data Types DB2 Data Type XML Schema Data Type Bigint 1 xs:long Binary 2 xs:hexBinary Blob xs:hexBinary Char xs:string Char for Bit Data xs:hexBinary Clob xs:string Date xs:date DB2XML.XMLClob xs:anyType DB2XML.XMLFile xs:anyType DB2XML.XMLVarchar xs:anyType DBClob xs:string Decfloat 3 xs:decimal Decimal xs:decimal Double xs:double Double Precision xs:double Float xs:double Float(n), n > 24 xs:double Integer xs:int Long Varchar for Bit Data xs:hexBinary Long Vargraphic xs:string Numeric xs:decimal Real xs:float Rowid 4 xs:string Smallint xs:short Time xs:time Timestamp xs:dateTime Varbinary 2 xs:hexBinary Varchar xs:string Varchar for Bit Data xs:hexBinary Xml 5 xs:anyType
1 Supported for DB2 for Linux, UNIX, and Windows v8.x and v9.x and for DB2 for z/OS v9.x only.2 Supported for DB2 v9.x for z/OS only.3 Supported for DB2 for Linux, UNIX, and Windows v9.x and for DB2 for z/OS v9.x only.4 Supported for DB2 for z/OS and DB2 for iSeries only.5 Supported for DB2 for Linux, UNIX, and Windows v9.x only.
Informix
Table E-2 describes how Informix data types are mapped to XML schema data types for DataDirect XQuery. Any Informix data type that is not listed is not supported by DataDirect XQuery.
MySQL
Table E-3 describes how MySQL data types are mapped to XML schema data types for DataDirect XQuery. Any MySQL data type that is not listed is not supported by DataDirect XQuery.
Oracle
Table E-4 describes how Oracle data types are mapped to XML schema data types for DataDirect XQuery. Any Oracle data type that is not listed is not supported by DataDirect XQuery.
Table E-4. Oracle Data Types Oracle Data Type XML Schema Data Type BFILE xs:hexBinary BINARY_FLOAT xs:float BINARY_DOUBLE xs:double BLOB xs:hexBinary CHAR xs:string CLOB xs:string DATE xs:dateTime FLOAT(n) xs:double LONG xs:string LONG RAW xs:hexBinary NCHAR xs:string NCLOB xs:string NUMBER (p, s) xs:decimal NUMERIC xs:decimal NVARCHAR2 xs:string RAW xs:hexBinary REAL xs:double ROWID xs:string SMALLINT xs:decimal TIMESTAMP xs:dateTime TIMESTAMP WITH LOCAL TIME ZONE xs:dateTime TIMESTAMP WITH TIME ZONE xs:dateTime UROWID xs:string VARCHAR2 xs:string XMLTYPE1 xs:anyType
1 Supported for Oracle 10gR2 and 11gR1 only.
PostgreSQL
Table E-5 describes how PostgreSQL data types are mapped to XML schema data types for DataDirect XQuery. Any PostgreSQL data type that is not listed is not supported by DataDirect XQuery.
Microsoft SQL Server
Table E-6 describes how Microsoft SQL Server data types are mapped to XML schema data types for DataDirect XQuery. Any Microsoft SQL Server data type that is not listed is not supported by DataDirect XQuery.
Sybase
Table E-7 describes how Sybase data types are mapped to XML schema data types for DataDirect XQuery. Any Sybase data type that is not listed is not supported by DataDirect XQuery.