Changes in This Release for Oracle XML DB Developer's Guide

This preface contains:

Changes in Oracle Database 12c Release 1 (12.1.0.2) for Oracle Database

The following are changes in Oracle XML DB Developer's Guide for Oracle Database 12c Release 1 (12.1.0.2).

New Features

The following features are new in this release.

JSON Support

Oracle Database now supports JavaScript Object Notation (JSON). See also Chapter 39, "JSON in Oracle Database".

PL/SQL Subprograms For Realm Configuration

PL/SQL subprograms getHTTPConfigRealm and setHTTPConfigRealm have been added to package DBMS_XDB_CONFIG.

Changes in Oracle Database 12c Release 1 (12.1.0.1) for Oracle XML DB

The following are changes in Oracle XML DB Developer's Guide for Oracle Database 12c Release 1 (12.1.0.1).

New Features

The following features are new in this release.

Oracle XML DB is Mandatory – You Cannot Uninstall it

Oracle XML DB is now a mandatory component of Oracle Database. You cannot uninstall it, and there is no option not to include it when you create Oracle Database. It is automatically installed when you create a new database or (if not existing already) when you upgrade an existing database to Oracle Database 12c. See also "Automatic Installation of Oracle XML DB".

XQuery Update Support

Oracle XML DB now supports XQuery Update. The Oracle-specific SQL functions for updating XML data are deprecated.

See Also:

XQuery Full Text Support

Oracle XML DB now supports XQuery Full Text.

New XQuery Extension-Expression Pragmas

The following XQuery extension-expression pragmas are new:

  • (#ora:child-element-name name #) – Specify the name to use for a child element that is inserted.

  • (#ora:no_schema #) – Do not raise an error if an XQuery Full Text expression is used with XML Schema-based XMLType data.

  • (#ora:use_xmltext_idx #) – Use an XML search index, if available, to evaluate the query. Do not use an XMLIndex index or streaming evaluation.

Replication and Rolling Upgrade Support

The following new features provide better support for replication and rolling upgrade.

Oracle GoldenGate and Oracle Data Guard SQL Apply Support for XMLType

Oracle GoldenGate replication and Oracle Data Guard SQL Apply (logical standby) are now supported for all XMLType storage models.

See Also:

Rolling Upgrade Supports Oracle XML DB Repository

When you perform a rolling upgrade, Oracle XML DB Repository operations are applied on the standby database as part of the SQL apply step. See "Upgrade or Downgrade of an Existing Oracle XML DB Installation" for applicable restrictions.

Parallel DML Support for XMLType

Support for parallel DML has been improved for XMLType storage model binary XML using SecureFiles LOBs. The performance and scalability have been improved for both CREATE TABLE AS SELECT and INSERT AS SELECT.

XMLIndex Improvements

Indexing XML data using XMLIndex has been improved in the following ways.

XMLIndex Index Synchronization Improvements

Index synchronization has been improved in these ways:

  • Less undo space is used.

  • If an error is raised during indexing then most of the index synchronization work is saved.

XMLIndex Support for Hash Partitioning

You can create a locally partitioned XMLindex index on XMLType tables and columns that you have partitioned using hash partitioning (in addition to range and list partitioning).

PL/SQL Package DBMS_XDB Is Split

The subprograms and constants of PL/SQL package DBMS_XDB have been divided among the following packages:

  • DBMS_XDB_ADMIN

  • DBMS_XDB_CONFIG

  • DBMS_XDB_REPOS

Packages DBMS_XDB_CONFIG and DBMS_XDB_REPOS are new in Oracle Database 12c Release 1 (12.1.0.1). Package DBMS_XDB continues to exist for backward compatibility.

See Also:

Digest Access Authentication Access to the Repository

Users can now access Oracle XML DB Repository using digest access authentication (also known as digest authentication), in addition to basic authentication. This provides encryption of user credentials (name, password, etc.) without the overhead of complete data encryption.

Note that user credentials are case-sensitive. In particular, a user name to be authenticated must exactly match the name as it was created (which by default is all uppercase).

See Also:

DBFS Support

You can now access Oracle Database File System (DBFS) files and folders from Oracle XML DB Repository, under the repository path /dbfs. This new feature provides you with FTP and HTTP(S)/WebDAV access to DBFS files and folders.

XQuery API for Java (XQJ) Support

You can now use Oracle XML Developer's Kit and XQuery API for Java (XQJ) to access XML data in the database using XQuery expressions from Java programs. In particular, you can access XML data stored in remote databases from a local Java program.

Deprecated Features

The following features are deprecated in this release, and may be desupported in a future release.

  • CLOB storage of XMLType, also known as unstructured storage, is deprecated. Use binary XML storage of XMLType instead.

    If you need to preserve insignificant whitespace then store two copies of your original XML document: one as an XMLType instance for database use and XML processing, the other as a CLOB instance to provide document fidelity.

  • Creation of an XMLIndex index over an XML fragment stored as a CLOB instance embedded in object-relational XMLType data is deprecated. If you need to index the data in such a fragment then store the document using binary XML storage, not object-relational storage.

  • The following PL/SQL subprograms in package DBMS_XMLSCHEMA are deprecated:

    • generateSchema

    • generateSchemas

    There are no replacements for these constructs and there is no workaround for this change.

  • PL/SQL package DBMS_XDB_CONFIG is new. All Oracle XML DB configuration functions, procedures, and constants have been moved from package DBMS_XDB to DBMS_XDB_CONFIG. They are deprecated for package DBMS_XDB. Oracle recommends that you use them in package DBMS_XDB_CONFIG instead.

    These are the subprograms that are deprecated in package DBMS_XDB:

    • ADDHTTPEXPIREMAPPING

    • ADDMIMEMAPPING

    • ADDSCHEMALOCMAPPING

    • ADDSERVLET

    • ADDSERVLETMAPPING

    • ADDSERVLETSECROLE

    • ADDXMLEXTENSION

    • CFG_GET

    • CFG_REFRESH

    • CFG_UPDATE

    • DELETEHTTPEXPIREMAPPING

    • DELETEMIMEMAPPING

    • DELETESCHEMALOCMAPPING

    • DELETESERVLET

    • DELETESERVLETMAPPING

    • DELETESERVLETSECROLE

    • DELETEXMLEXTENSION

    • GETFTPPORT

    • GETHTTPPORT

    • GETLISTENERENDPOINT

    • SETFTPPORT

    • SETHTTPPORT

    • SETLISTENERENDPOINT

    • SETLISTENERLOCALACCESS

    These are the constants that are deprecated in package DBMS_XDB:

    • XDB_ENDPOINT_HTTP

    • XDB_ENDPOINT_HTTP2

    • XDB_PROTOCOL_TCP

    • XDB_PROTOCOL_TCPS

    See Also:

    Oracle Database PL/SQL Packages and Types Reference, Chapter "DBMS_XDB_CONFIG"
  • All Oracle SQL functions for updating XML data are deprecated. Oracle recommends that you use XQuery Update instead. These are the deprecated XML updating functions:

    • updateXML

    • insertChildXML

    • insertChildXMLbefore

    • insertChildXMLafter

    • insertXMLbefore

    • insertXMLafter

    • appendChildXML

    • deleteXML

  • Oracle SQL function sys_xmlgen is deprecated. Oracle recommends that you use the SQL/XML generation functions instead.

  • The following Oracle XQuery functions are deprecated. Use the corresponding standard XQuery functions instead, that is, the functions with the same names but with namespace prefix fn.

    • ora:matches – use fn:matches instead

    • ora:replace – use fn:replace instead

  • The following Oracle constructs that provide support for XML translations are deprecated.

    • PL/SQL package DBMS_XMLTRANSLATIONS

    • Oracle XPath function ora:translate

    • XML Schema annotations xdb:maxOccurs, xdb:srclang, and xdb:translate

    There are no replacements for these constructs and there is no workaround for this change.

  • The following XML Schema annotations are deprecated:

    • xdb:defaultTableSchema

    • xdb:maintainOrder

    • xdb:mapUnboundedStringToLob

    • xdb:maxOccursFoot 1 

    • xdb:SQLCollSchema

    • xdb:SQLSchema

    • xdb:srclangFootref 1

    • xdb:storeVarrayAsTable

    • xdb:translateFootref 1

    There are no replacements for these constructs, and there is no workaround for this change.

  • The value xml_clobs for export parameter data_options is deprecated starting with Oracle Database 12c Release 1 (12.1).

Desupported Features

The following features are no longer supported by Oracle. See Oracle Database Upgrade Guide for a complete list of desupported features in this release.

  • CTXSYS.CTXXPATH index is desupported. Use XMLIndex indexes instead

Changes in Oracle Database 11g Release 2 (11.2.0.3) for Oracle XML DB

The following are changes in Oracle XML DB Developer's Guide for Oracle Database 11g Release 2 (11.2.0.3).

Deprecated Features

The following features are deprecated in this release, and may be desupported in a future release.

  • PL/SQL procedure DBMS_XDB_ADMIN.createRepositoryXMLIndex

  • PL/SQL procedure DBMS_XDB_ADMIN.XMLIndexAddPath

  • PL/SQL procedure DBMS_XDB_ADMIN.XMLIndexRemovePath

  • PL/SQL procedure DBMS_XDB_ADMIN.dropRepositoryXMLIndex

  • XML schema annotation (attribute) csx:encodingType

  • XMLIndex index on CLOB XMLType data that is embedded within object-relational XMLType data

Other Changes

The following PL/SQL procedures have been moved from package DBMS_XDB to package DBMS_XDB_ADMIN in Oracle Database 11g Release 2 (11.2.0.3):

  • moveXDB_tablespace

  • rebuildHierarchicalIndex

Changes in Oracle Database 11g Release 2 (11.2.0.2) for Oracle XML DB

The following are changes in Oracle XML DB Developer's Guide for Oracle Database 11g Release 2 (11.2.0.2).

New Features

The following Oracle XML DB features are new in Oracle Database 11g Release 2 (11.2.0.2).

Default Storage Model for XMLType

The default XMLType storage model is used if you do not specify a storage model when you create an XMLType table or column. Prior to Oracle Database 11g Release 2 (11.2.0.2), CLOB storage was used by default. The default storage model is now binary XML storage.

Note:

You can create a new table that uses binary XML storage and populate it with existing XMLType data that is stored using CLOB storage. Use CREATE TABLE AS SELECT..., selecting from the existing data.

This functionality is available starting with Oracle Database 11g Release 2 (11.2.0.2).

Default LOB Storage for Binary XML

XMLType data that uses the binary XML storage model is stored internally using large objects (LOBs). Prior to Oracle Database 11g Release 2 (11.2.0.2), binary XML data was stored by default using the BasicFiles LOB storage option. By default, LOB storage for binary XML data now uses the SecureFiles LOB storage option whenever possible.

If SecureFiles LOB storage is not possible then the default behavior uses BasicFiles LOB storage. This can occur if either of the following is true:

  • The tablespace for the XMLType table does not use automatic segment space management.

  • A setting in file init.ora prevents SecureFiles LOB storage. For example, see parameter DB_SECUREFILE.

See Also:

This functionality is available starting with Oracle Database 11g Release 2 (11.2.0.2).

XQuery Pragma ora:defaultTable for Repository Query Performance

Previously, to obtain optimal performance for XQuery expressions that use fn:doc and fn:collection over Oracle XML DB Repository resources, you needed to carry out explicit joins with RESOURCE_VIEW. The new XQuery extension-expression pragma ora:defaultTable now performs the necessary joins automatically.

This functionality is available starting with Oracle Database 11g Release 2 (11.2.0.2).

XML Diagnosability Mode: SQL*Plus System Variable XMLOptimizationCheck

You can use the SQL*Plus SET command with the new system variable XMLOptimizationCheck to turn on an XML diagnosability mode for SQL. When this mode is on, execution plans are automatically checked for XPath rewrite, and if a plan is suboptimal then an error is raised and diagnostic information is written to the trace file indicating which operators are not rewritten.

This functionality is available starting with Oracle Database 11g Release 2 (11.2.0.2).

Deprecated Features

The following features are deprecated in this release, and may be desupported in a future release.

Changes in Oracle Database 11g Release 2 (11.2.0.1) for Oracle XML DB

The following are changes in Oracle XML DB Developer's Guide for Oracle Database 11g Release 2 (11.2.0.1).

New Features

The following Oracle XML DB features are new in Oracle Database 11g Release 2 (11.2.0.1).

Partitioning XMLType Tables and Columns

For XMLType data stored object-relationally, when you partition a base XMLType table or a base table with an XMLType column, any collection tables that use heap-based table storage are now, by default, automatically equipartitioned also. Equipartitioning means that there is a corresponding collection-table partition for each partition of the base table. A child element is stored in the collection-table partition that corresponds to the base-table partition of its parent element.

Access Control Enhancements

Access control lists (ACLs) have been enhanced in various ways, to provide fine-grained access control that you can customize. You can define your own privileges and associate them with users and roles in flexible ways. Access control entries (ACEs) can stipulate start and end dates. You can control access for application users and roles that are not necessarily the same as database users and roles.

Repository Read and Write Performance Enhancements

Performance has been improved for Oracle XML DB Repository read and write operations.

Binary XML Performance Enhancements and Partitioning

The performance of queries and DML operations on binary XML tables has been improved, and you can now partition binary XML tables, using a virtual column as the partitioning key.

XMLIndex Enhancements

You can use XMLIndex to index islands of structured XML content embedded in content that is generally unstructured. An XMLIndex index can thus index both structured and unstructured XML content.

You can create a local XMLIndex index on data in partitioned XMLType tables.

See Also:

"XMLIndex"

Cost-Based XPath Rewrite

You can use a new optimizer hint to request cost-based optimization of XQuery expressions.

New Default Type Mappings for Object-Relational Storage

For XMLType data that is stored object-relationally, XML Schema data types are mapped to SQL data types. Oracle defines a set of default mappings, but you can override these by specifying particular mappings to be used for specific parts of a given XML schema.

Oracle now offers a new set of default mappings. The following lists the differences from the default mappings available prior to Oracle Database 11g Release 2 (11.2.0.1). In the new set of default mappings:

  • xs:float is mapped to BINARY FLOAT, instead of NUMBER.

  • xs:dateTime is mapped to TIMESTAMP WITH TIMEZONE, instead of TIMESTAMP.

  • An instance of xs:string that is longer than 4000 bytes is of type CLOB by default, instead of type VARCHAR2(4000).

By default, the old set of default mappings is used, for reasons of backward compatibility. To use the new default mappings instead, you must do both of the following:

  • Set database parameter compatible in file init.ora to 11.2 or higher.

  • Set element default-type-mappings in the Oracle XML DB configuration file, xdbconfig.xml, to post-11.2.

Deprecated Features

The following Oracle XML DB constructs are deprecated in Oracle Database 11g Release 2 (11.2.0.1). They are still supported in 11.2.0.1 for backward compatibility, but Oracle recommends that you do not use them in new applications.

Changes in Oracle Database 11g Release 1 (11.1) for Oracle XML DB

The following are changes in Oracle XML DB Developer's Guide for Oracle Database 11g Release 1 (11.1).

New Features

The following Oracle XML DB features are new in Oracle Database 11g Release 1 (11.1).

Binary XML

Binary XML is a new storage model for abstract data type XMLType, joining the existing storage models of object-relational and CLOB storage. Binary XML is XML-Schema aware, but it can also be used with XML data that is not based on an XML schema. See "XMLType Storage Models".

See Also:

XMLIndex

A new index type is provided for XMLType: XMLIndex. This can greatly improve the performance of XPath-based predicates and fragment extraction for XMLType data, whether based on an XML schema or not. The new index type is a (logical) domain index that consists of underlying physical tables and secondary indexes. See Chapter 6, "Indexes for XMLType Data".

Note:

The CTXSYS.CTXXPath index is deprecated in Oracle Database 11g Release 1 (11.1). The functionality that was provided by CTXXPath is now provided by XMLIndex.

Oracle recommends that you replace CTXXPath indexes with XMLIndex indexes. The intention is that CTXXPath will no longer be supported in a future release of the database.

See Also:

Oracle Database PL/SQL Packages and Types Reference for information about new PL/SQL package DBMS_XMLINDEX

XMLType OCTs Now Use Heap Storage Instead of IOTs

You can store collections of XML elements as ordered collection tables (OCTs). OCTs now use heap storage, by default. In prior releases, OCTs were index-organized tables (IOTs), by default. A new XML schema registration option, REGISTER_NT_AS_IOT, forces the use of IOTs.

Default Value of XML Schema Annotation xdb:storeVarrayAsTable Is Now true

In prior releases, the default value of XML schema annotation xdb:storeVarrayAsTable was false; the default value is now true. This means that by default an XML collection is stored as a set of rows in an ordered collection table (OCT). Each row corresponds to an element in the collection. With annotation xdb:storeVarrayAsTable = "false", the entire collection is instead serialized as a varray and stored in a LOB column.

Using xdb:storeVarrayAsTable = "true" facilitates the efficient use of collections: queries, updates, and creation of B-tree indexes.

Repository Events

Applications can now register listeners with handlers for events associated with Oracle XML DB Repository operations such as creating, deleting, and updating a resource. See Chapter 30, "Oracle XML DB Repository Events".

See Also:

Support for Content Repository API for Java (JCR: JSR-170)

Oracle XML DB now supports Content Repository API for Java (JCR) and the JSR-170 standard. You can access Oracle XML DB Repository using the JCR APIs. See Chapter 31, "Oracle XML DB Content Connector".

See Also:

Oracle Database XML Java API Reference for new Java methods

New Repository Resource Link Types

You can now create weak folder links to represent Oracle XML DB Repository folder-child relationships. Hard links are still available, as well. See "Link Types".

See Also:

Support for WebDAV Privileges and New Oracle XML DB Privileges

All WebDAV privileges are now supported by Oracle XML DB Repository. In addition, there are some new Oracle XML DB-specific atomic privileges. See Chapter 27, "Repository Access Control".

See Also:

Web Services

You can now access Oracle Database through Web services. You can write and deploy Web services that can query the database using SQL or XQuery, or access stored PL/SQL functions and procedures. See Chapter 34, "Native Oracle XML DB Web Services"

In-Place XML Schema Evolution

In many cases, you can now evolve XML schemas without copying the corresponding XML instance documents. See Chapter 20, "XML Schema Evolution".

See Also:

Oracle Database PL/SQL Packages and Types Reference for updates to PL/SQL package DBMS_XMLSCHEMA

Support for Recursive XML Schemas

Oracle XML DB now performs XPath rewrite on some queries that use '//' in XPath expressions to target nodes at multiple or arbitrary depths, even when the XML data conforms to a recursive XML schema. See "Support for Recursive Schemas"

See Also:

Oracle Database PL/SQL Packages and Types Reference for updates to PL/SQL package DBMS_XMLSCHEMA

Support for XLink and XInclude

Oracle XML DB now supports the XLink and XInclude standards. See Chapter 23, "How To Use XLink and XInclude with Oracle XML DB".

Support for XML Translations

You can now associate natural-language translation information with XML schemas and corresponding instance documents. This includes support for standard attributes xml:lang and xml:srclang. See "XML Translations (Deprecated)".

See Also:

Oracle Database PL/SQL Packages and Types Reference for information about new PL/SQL package DBMS_XMLTRANSLATIONS

Support for Large XML Nodes

The previous 64K limit on text nodes and attribute values has been lifted. Text nodes and attribute values are no longer limited in size to 64K bytes each. New streaming push and pull APIs are available in PL/SQL, Java, and C to provide virtually unlimited node sizes. See "Large Node Handling Using DBMS_XMLDOM" for information about handling large nodes in PL/SQL and "Large XML Node Handling with Java".

See Also:

Unified Java API

The Java XML APIs in Oracle XML DB and Oracle XML Developer's Kit have been unified.

Oracle Data Pump Support for XMLType

Oracle Data Pump is now the recommended way to import and export XMLType data. See Chapter 37, "Export and Import of Oracle XML DB Data".

Support for XMLType by Oracle Streams and Logical Standby

Oracle Streams and logical standby now support XMLType stored as CLOB. Both XML schema-based and non-schema-based XML data are supported.

Oracle XML Developer's Kit Pull-Parser API (XML Events, JSR-173)

You can use the new Oracle XML Developer Kit (XDK) pull-parser API with Oracle XML DB. See "Using the Oracle XML Developer's Kit Pull Parser with Oracle XML DB".

See Also:

XQuery Standard Compliance

Oracle XML DB support for the XQuery language has been updated to reflect the latest version of the XQuery standard, W3C XQuery 1.0 Recommendation.

See Also:

Fine-Grained Access to Network Services Using PL/SQL

New atomic privileges are provided for access control entries (ACEs). These privileges are used for fine-grained PL/SQL access to network services.

See Also:

Oracle Database PL/SQL Packages and Types Reference for information on package DBMS_NETWORK_ACL_ADMIN

SQL/XML Standard Compliance and Performance Enhancements

Oracle XML DB support for the SQL/XML standard has been updated to reflect the latest version of the standard. This includes support for standard SQL functions XMLExists and XMLCast. See Chapter 4, "XQuery and Oracle XML DB" and "Generation of XML Data Using SQL Functions".

See Also:

Oracle Database SQL Language Reference for information about SQL/XML functions XMLExists, XMLCast, XMLQuery, XMLTable, and XMLForest.

XML-Update Performance Enhancements

The performance of SQL functions used to update XML data has been enhanced for XML schema-based data that is stored object-relationally. This includes XPath rewrite for SQL functions updateXML, insertChildXML, and deleteXML.

XQuery and SQL/XML Performance Enhancements

XQuery and SQL/XML performance enhancements include treatment of the following:

  • User-defined XQuery functions

  • XQuery prolog variables

  • XQuery count function applied to the result of using a SQL/XML generation function

  • Positional expressions in XPath predicates

  • XQuery computed constructors

  • SQL/XML function XMLAgg

XSLT Performance Enhancements

The performance of XSLT transformations using SQL function XMLTransform and XMLType method transform() has been enhanced.



Footnote Legend

Footnote 1: See also "Deprecated Features" regarding deprecated support for XML translations.