![]() ![]() ![]() ![]() ![]() ![]() |
This appendix provides information about the native RDBMS Data Type support and XQuery mappings that the BEA XQuery engine generates or supports. It includes the following topics:
For information about using these mappings in ALSB XQueries, see Accessing Databases Using XQuery.
For complete information about database and JDBC drivers support in ALSB, see Supported Database Configurations in Supported Configurations for AquaLogic Service Bus.
This section identifies the data type mappings that the XQuery engine generates or supports for IBM DB2/NT 8.
CLOB1
|
|
DECIMAL(p,s)2 (NUMERIC)
|
|
LONG VARCHAR1
|
|
TIME3
|
xs:time4
|
TIMESTAMP5
|
xs:dateTime4
|
xs:string4
|
|
1Pushed down in project list only. 2Where p is precision (total number of digits, both to the right and left of decimal point) and s is scale (total number of digits to the right of decimal point). 3Accurate to 1 second. 4Values converted to local time zone (timezone information removed) due to TIME and TIMESTAMP limitations. See XQuery-SQL Data Type Mappings in XQuery Engine and SQL in the XQuery Developer's Guide for more information. 5Precision limited to milliseconds. |
This section identifies the data type mappings that the XQuery engine generates or supports for Microsoft SQL Server.
DATETIME1
|
xs:dateTime2
|
DECIMAL(p,s)3 (NUMERIC)
|
|
NTEXT4
|
|
SMALLDATETIME5
|
|
TEXT4
|
|
1Fractional-second-precision up to 3 digits (milliseconds). No timezone. 2Values converted to local time zone (timezone information removed) and fractional seconds truncated to milliseconds due to DATETIME limitations. See XQuery-SQL Data Type Mappings in XQuery Engine and SQL in the XQuery Developer's Guide for more information. 3Where p is precision (total number of digits, both to the right and left of decimal point) and s is scale (total number of digits to the right of decimal point). 4Pushed down in project list only. 5Accuracy of 1 minute. |
This section identifies the data types that the XQuery engine generates or supports for Oracle 8.1.x (Oracle 8i).
CLOB1
|
|
DATE2
|
|
LONG1
|
|
NCLOB1
|
|
NUMBER(p,s)3
|
|
1Pushed down in project list only. 2Does not support fractional seconds. 3Where p is precision (total number of digits, both to the right and left of decimal point) and s is scale (total number of digits to the right of decimal point). |
This section identifies the data type and other mappings that the XQuery engine generates or supports for Oracle 9.x (Oracle 9i) and Oracle 10.x (Oracle 10g). Note that Oracle treats empty strings as NULLs, which deviates from XQuery semantics and may lead to unexpected results for expressions that are pushed down.
CLOB1
|
|
xs:dateTime2
|
|
LONG1
|
|
NCLOB1
|
|
xs:dateTime3
|
|
1Pushed down in project list only. 2When SDO stores xs:dateTime value in Oracle DATE type, it is converted to local time zone and fractional seconds are truncated due to DATE limitations. See XQuery-SQL Data Type Mappings in XQuery Engine and SQL in the XQuery Developer's Guide for more information. 3XQuery engine maps XQuery xs:dateTime to either TIMESTAMP or TIMESTAMP WITH TIMEZONE data type, depending on presence of timezone information. Storing xs:dateTime using SDO may result in loss of precision for fractional seconds, depending on the SQL type definition. |
This section identifies the data types that the XQuery engine generates or supports for Sybase 12.5.2 (and higher).
Note: | Sybase deviates from XQuery semantics (which ignores empty strings) and treats empty strings as a single-space string. |
DATETIME1
|
xs:dateTime2
|
DECIMAL(p,s)3 (NUMERIC)
|
|
SMALLDATETIME4
|
|
TEXT5
|
|
1Supports fractional seconds up to 3 digits (milliseconds) precision; no timezone information. 2When SDO stores xs:dateTime value in Oracle DATE type, it is converted to local time zone and fractional seconds are truncated due to DATE limitations. See XQuery-SQL Data Type Mappings in XQuery Engine and SQL in the XQuery Developer's Guide for more information. 3Where p is precision (total number of digits, both to the right and left of decimal point) and s is scale (total number of digits to the right of decimal point). 4Accurate to 1 minute. 5Expressions returning text are pushed down in the project list only. |
This section identifies the data types that the XQuery engine generates or supports for Pointbase.
DECIMAL(p,s)1 (NUMERIC)
|
|
1Where p is precision (total number of digits, both to the right and left of decimal point) and s is scale (total number of digits to the right of decimal point). |
When mapping SQL to XQuery data types, the XQuery engine first checks the JDBC typecode. If the typecode has a corresponding XQuery type, the XQuery engine uses the matching native type name. If no matching typecode or type name is available, the column is ignored. Table A-7 shows this mapping.
CLOB1
|
||
xs:date2
|
||
DECIMAL (p,s)3
|
||
LONGVARCHAR1
|
||
NUMERIC (p,s)3
|
||
TIME4
|
xs:time4
|
|
TIMESTAMP4
|
||
1Pushed down in project list only. 2Values converted to local time zone (timezone information removed) due to DATE limitations. See XQuery-SQL Data Type Mappings in XQuery Engine and SQL in the XQuery Developer's Guide for more information. 3Where p is precision (total number of digits, both to the right and left of decimal point) and s is scale (total number of digits to the right of decimal point). 4Precision of underlying RDBMS determines the precision of TIME data type and how much truncation, if any, will occur in translating xs:time to TIME. |
Accessing Databases Using XQuery
![]() ![]() ![]() |