2 Getting Started with Oracle XML DB

This chapter provides some preliminary design criteria for consideration when planning your Oracle XML DB solution.

This chapter contains these topics:

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:

    SELECT * FROM ALL_USERS;
    
  • View RESOURCE_VIEW exists. To check that, use this command:

    DESCRIBE RESOURCE_VIEW
    

See Also:

Oracle XML DB Use Cases

Oracle XML DB is suited for any application where some or all of the data processed by the application 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

Application Design Considerations for Oracle XML DB

This section describes some preliminary design criteria that you can consider when planning your Oracle XML DB application. However, 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

XML Data Storage

There are various 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.

Structure of Your XML Data

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.

Application Language

You can program your Oracle XML DB applications in the following languages:

XML Processing Options

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

Oracle XML DB Repository Access

This section pertains to data that is stored as resources in Oracle XML DB Repository.

There are two main repository access methods:

These options for accessing repository data are also discussed in Chapter 21, "Accessing Oracle XML DB Repository Data".

You can also consider the following access criteria:

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, including the following.