2 Getting Started with Oracle XML DB

Some preliminary design criteria are presented for consideration when planning your Oracle XML DB solution.

2.1 Oracle XML DB Installation

Oracle XML DB is installed automatically if Database Configuration Assistant (DBCA) is used to build Oracle Database using the general-purpose template.

You can determine whether or not Oracle XML DB is already installed. If it is installed, then the following are true:

  • Database schema (user account) XDB exists. To check that, run this query:

  • View RESOURCE_VIEW exists. To check that, use this command:


See Also:

2.2 Oracle XML DB Use Cases

Oracle XML DB is suited for any application where some or all of the data processed is represented using XML.

Oracle XML DB provides for high-performance database ingestion, storage, processing and retrieval of XML data. It also lets you quickly and easily generate XML from existing relational data. Applications for which Oracle XML DB is particularly suited include the following:

  • Business-to-business (B2B) and application-to-application (A2A) integration

  • Internet

  • Content-management

  • Messaging

  • Web Services

A typical Oracle XML DB application has at least one of the following characteristics:

  • Large numbers of XML documents must be ingested or generated

  • Large XML documents must be processed or generated

  • High-performance searching is needed, both within a document and across large collections of documents

  • High levels of security are needed

  • Fine-grained security is needed

  • Data processing must use XML documents, and data must be stored in relational tables

  • Programming must support open standards such as SQL, XML, XQuery, XPath, and XSL

  • Information must be accessed using standard Internet protocols such as FTP, HTTP(S)/WebDAV, and Java Database Connectivity (JDBC)

  • XML data must be queried from SQL

  • Analytic capabilities must be applied to XML data

  • XML documents must be validated against an XML schema

2.3 Application Design Considerations for Oracle XML DB

When planning an Oracle XML DB application it can be worthwhile to consider some preliminary design criteria.

These include the following:

  • The ways that you intend to store your XML data

  • The structure of your XML data

  • The languages used to implement your application

  • The ways you intend to process your XML data

However, in general Oracle recommends that you start with the following Oracle XML DB features. For most use cases they are all that you need to consider.

  • Storage model – binary XML

  • Indexing – XML search index, XMLIndex with structured component

  • Database language – SQL, with SQL/XML functions

  • XML languages – XQuery and XSLT

  • Client APIs – OCI, thin JDBC, SQL .NET

2.3.1 XML Data Storage

There are several ways to store XML data in Oracle Database.

Storage of XMLType tables and views is outlined in Figure 2-1.

Figure 2-1 Oracle XML DB Storage Options for XML Data

Description of Figure 2-1 follows
Description of "Figure 2-1 Oracle XML DB Storage Options for XML Data"

If you have existing relational data, you can access it as XML data by creating XMLType views over it. You can use the following to define the XMLType views:

Regardless of which storage options you choose for your application, Oracle XML DB provides the same functionality. Though the storage model you use can affect your application performance and XML data fidelity, it is totally independent of how frequently you query or update your data and what APIs your application uses.

Related Topics

2.3.2 The Structure of Your XML Data

How structured your XML data is, and whether it is based on an XML schema, can influence how you store it.

If your XML data is not XML Schema-based, then, regardless of how structured it is, you can store it in an XMLType table or view as binary XML, or you can store it as a file in an Oracle XML DB Repository folder. You cannot store it object-relationally.

If your XML data is XML Schema-based then you must store it as binary XML or object-relationally.

2.3.3 Languages Used to Implement Your Application

You can program your Oracle XML DB applications in Java (JDBC, Java Servlets) or PL/SQL.

2.3.4 XML Processing Options

Oracle XML DB offers a full range of XML processing options.

The following are available and should be considered when designing your Oracle XML DB application:

2.3.5 Oracle XML DB Repository Access

Design considerations for applications that use Oracle XML DB Repository include access method, security needs, and whether you need versioning.

There are two main repository access methods:

These options for accessing repository data are also discussed in Access to Oracle XML DB Repository Data.

You can also consider the following access criteria:

2.3.6 Oracle XML DB Cooperates with Other Database Options and Features

Oracle XML DB is an integrated part of Oracle Database, and works well with other database options and features.