Oracle® XML DB Developer's Guide 10g Release 1 (10.1) Part Number B10790-01 |
|
|
View PDF |
This manual describes Oracle XML DB, and how it stores, generates, manipulates, manages, and queries XML in the database using Oracle XML DB.
After introducing you to the heart of Oracle XML DB, namely the XMLType
framework and Oracle XML DB repository, the manual provides a brief introduction to design criteria to consider when planning your Oracle XML DB application. It provides examples of how and where you can use Oracle XML DB.
The manual then describes ways you can store and retrieve XML data using Oracle XML DB, APIs for manipulating XMLType
data, and ways you can view, generate, transform, and search on existing XML data. The remainder of the manual discusses how to use Oracle XML DB repository, including versioning and security, how to access and manipulate repository resources using protocols, SQL, PL/SQL, or Java, and how to manage your Oracle XML DB application using Oracle Enterprise Manager. It also introduces you to XML messaging and Oracle Streams Advanced Queuing XMLType
support.
This Preface contains these topics:
This manual is intended for developers building XML Oracle Database applications.
An understanding of XML, XML Schema, XPath, and XSL is helpful when using this manual.
Many examples provided here are in SQL, PL/SQL, Java, or C, hence, a working knowledge of one or more of these languages is presumed.
Our goal is to make Oracle products, services, and supporting documentation accessible, with good usability, to the disabled community. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Standards will continue to evolve over time, and Oracle is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For additional information, visit the Oracle Accessibility Program Web site at
http://www.oracle.com/accessibility/
JAWS, a Windows screen reader, may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, JAWS may not always read a line of text that consists solely of a bracket or brace.
This documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control. Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites.
This document contains the following parts, chapters, and appendixes:
Introduces you to the Oracle XML DB components and architecture, including XMLType
and the repository. It discusses some basic design issues and provides a comprehensive set of examples of where and how you can use Oracle XML DB.
Introduces you to the Oracle XML DB components and architecture. It includes a description of the benefits of using Oracle XML DB, the key features, standards supported, and requirements for running Oracle XML DB. It lists Oracle XML DB-related terms used throughout the manual.
Describes how to install Oracle XML DB, compatibility and migration. It includes criteria for planning and designing your Oracle XML DB applications.
Introduces you to where and how you can use Oracle XML DB. It provides examples of storing, accessing, updating, and validating your XML data using Oracle XML DB.
Describes ways you can store, retrieve, validate, and transform XML data using Oracle Database 10g database native XMLType
Application Program Interface (API).
Describes how to create XMLType
tables and manipulate and query XML data for non-schema-based XMLType
tables and columns.
Describes how to use Oracle XML DB mapping from SQL to XML and back, provides an overview of how to register XML schema, deleting and updating XML schema, and how you can either use the default mapping of Oracle XML DB or specify your own.
Describes advanced techniques for mapping from simpleType and complexType XML to SQL structures. It also describes the use of query rewrites and how to use Ordered Collections in Tables (OCTs) in Oracle XML DB.
Describes how to update an XML schema registered with Oracle XML DB manually or using DBMS_XMLSCHEMA.CopyEvolve()
.
Describes how you can use SQL functions to transform XML data stored in the database and being retrieved or generated from the database. It also describes how you can use SQL functions to validate XML data entered into the database.
Describes how you can create an Oracle Text index on DBUriType
or Oracle XML DB UriType
columns and search XML data using the Oracle Text CONTAINS()
function and the XMLType existsNode()
function. It includes how to use CTXXPATH
index for XPath querying of XML data.
Describes the PL/SQL and Java APIs for XMLType, as well as the C DOM API for XML, and how to use them.
Introduces the PL/SQL DOM API for XMLType, PL/SQL Parser API for XMLType, and PL/SQL XSLT Processor API for XMLType. It includes examples and calling sequence diagrams.
Describes how to use PL/SQL package DBMS_XMLSTORE
to insert, update, and delete XML data.
Describes how to use the Java (JDBC) API for XMLType
. It includes examples and calling sequence diagrams.
Introduces the C API for XML used for XDK and Oracle XML DB applications. This chapter focuses on how to use C API for XML with Oracle XML DB.
Describes how to use Oracle Data Provider for .NET (ODP.NET) with Oracle XML DB.
Discusses SQL/XML, Oracle SQL/XML extension functions, and SQL functions for generating XML. SQL/XML functions include XMLElement()
and XMLForest()
. Oracle SQL/XML extension functions include XMLColAttValue()
. SQL functions include SYS_XMLGEN()
, XMLSEQUENCE()
, and SYS_XMLAGG()
. It also describes how to use DBMS_XMLGEN
, XSQL Pages Publishing Framework, and XML SQL Utility (XSU) to generate XML data from data stored in the database.
Describes how to create XMLType
views based on XML generation functions, object types, or transforming XMLType
tables. It also discusses how to manipulate XML data in XMLType
views.
Introduces you to how Oracle Database works with URIs and URLs. It describes how to use UriType
and associated sub-types: DBUriType
, HttpUriType
, and XDBUriType
to create and access database data using URLs. It also describes how to create instances of UriType
using the UriFactory
package, how to use SYS_DBURIGEN()
SQL function, and how to turn a URL into a database query using DBUri
servlet.
Describes Oracle XML DB repository, the concepts behind it, how to use versioning, security, the protocol server, and the various associated Oracle XML DB resource APIs.
Describes hierarchical indexing and foldering. Introduces you to the various Oracle XML DB repository components such as Oracle XML DB resource view API, Versioning, Oracle XML DB resource API for PL/SQL and Java.
Describes how to create a version-controlled resource (VCR) and how to access and update a VCR.
Describes how you can use SQL to access data stored in Oracle XML DB repository using Oracle XML DB resource view API. This chapter also compares the functionality of the other Oracle XML DB resource APIs.
Describes the Oracle XML DB resource API for PL/SQL.
Describes Oracle XML DB resource API for Java/JNDI and how to use it to access Oracle XML DB repository data.
Describes how to use Oracle XML DB resources and security and how to retrieve security information.
Introduces Oracle XML DB protocol server and how to use FTP, HTTP, and WebDAV with Oracle XML DB.
Introduces you to writing Oracle XML DB applications in Java. It describes which Java APIs are available inside and outside the database, tips for writing Oracle XML DB HTTP servlets, which parameters to use to configure servlets in the configuration file /xdbconfig.xml
, and HTTP request processing.
Includes chapters that describe the tools you can use to build and manage your Oracle XML DB application.
Describes how you can use Oracle Enterprise Manager to register your XML schema; create resources, XMLType
tables, views, and columns; manage ACL security, configure Oracle XML DB; and create function-based indexes.
Describes ways you can load XMLType
data using SQL*Loader.
Describes the IMPORT/EXPORT utility support for loading XMLType
tables.
Describes Oracle Streams Advanced Queuing support for XML and XMLType
messaging.
Introduces how you can use Oracle Streams Advanced Queuing to exchange XML data. It briefly describes Oracle Streams, Internet Data Access Presentation (IDAP), using AQ XML Servlet to enqueue and dequeue messages, using IDAP, and AQ XML schemas.
Describes how to install and configure Oracle XML DB.
Provides a summary of the W3C XML Schema Recommendation.
Provides an introduction to W3C XPath Recommendation, Namespace Recommendation, and Information Sets.
Provides an introduction to the W3C XSL/XSLT Recommendation.
Provides a summary of the Oracle XML DB Java API reference information.
Provides a summary of the Oracle XML DB PL/SQL API reference information.
Provides a summary of the C API for XML reference information.
Describes the RESOURCE_VIEW
and PATH_VIEW
structures and lists the sample resource XML schema supplied by Oracle XML DB.
Provides a brief summary of Oracle XML DB features. It includes a list of standards supported and limitations.
For more information, see these Oracle Database resources:
Oracle Database New Features for information about the differences between Oracle Database 10g and the Oracle Database 10g Enterprise Edition and the available features and options. This book also describes features new to Oracle Database 10g release 1 (10.1).
Oracle Database Error Messages. Oracle Database error message documentation is only available in HTML. If you only have access to the Oracle Database Documentation CD, you can browse the error messages by range. Once you find the specific range, use your browser's "find in page" feature to locate the specific message. When connected to the Internet, you can search for a specific error message using the error message search feature of the Oracle Database online documentation.
Oracle Database Application Developer's Guide - Fundamentals
Many of the examples in this book use the sample schemas of the seed database, which is installed by default when you install Oracle. Refer to Oracle Database Sample Schemas for information on how these schemas were created and how you can use them yourself.
Printed documentation is available for sale in the Oracle Store at
http://oraclestore.oracle.com/
To download free release notes, installation documentation, white papers, or other collateral, please visit the Oracle Technology Network (OTN). You must register online before using OTN; registration is free and can be done at
http://otn.oracle.com/membership/
If you already have a username and password for OTN, then you can go directly to the documentation section of the OTN Web site at
http://otn.oracle.com/documentation/
This section describes the conventions used in the text and code examples of this documentation set. It describes:
We use various conventions in text to help you more quickly identify special terms. The following table describes those conventions and provides examples of their use.
Convention | Meaning | Example |
---|---|---|
Bold | Bold typeface indicates terms that are defined in the text or terms that appear in a glossary, or both. | When you specify this clause, you create an index-organized table. |
Italics | Italic typeface indicates book titles or emphasis. | Oracle Database Concepts
Ensure that the recovery catalog and target database do not reside on the same disk. |
UPPERCASE monospace (fixed-width) font |
Uppercase monospace typeface indicates elements supplied by the system. Such elements include parameters, privileges, datatypes, RMAN keywords, SQL keywords, SQL*Plus or utility commands, packages and methods, as well as system-supplied column names, database objects and structures, usernames, and roles. | You can specify this clause only for a NUMBER column.
You can back up the database by using the Query the Use the |
lowercase monospace (fixed-width) font |
Lowercase monospace typeface indicates executables, filenames, directory names, and sample user-supplied elements. Such elements include computer and database names, net service names, and connect identifiers, as well as user-supplied database objects and structures, column names, packages and classes, usernames and roles, program units, and parameter values.
Note: Some programmatic elements use a mixture of UPPERCASE and lowercase. Enter these elements as shown. |
Enter sqlplus to start SQL*Plus.
The password is specified in the Back up the datafiles and control files in the The Set the Connect as The |
lowercase italic monospace (fixed-width) font |
Lowercase italic monospace font represents placeholders or variables. | You can specify the parallel_clause .
Run |
Code examples illustrate SQL, PL/SQL, SQL*Plus, or other command-line statements. They are displayed in a monospace (fixed-width) font and separated from normal text as shown in this example:
SELECT username FROM dba_users WHERE username = 'MIGRATE';
The following table describes typographic conventions used in code examples and provides examples of their use.
Convention | Meaning | Example |
---|---|---|
[ ] |
Brackets enclose one or more optional items. Do not enter the brackets. |
DECIMAL (digits [ , precision ]) |
{ } |
Braces enclose two or more items, one of which is required. Do not enter the braces. |
{ENABLE | DISABLE} |
| |
A vertical bar represents a choice of two or more options within brackets or braces. Enter one of the options. Do not enter the vertical bar. |
{ENABLE | DISABLE} [COMPRESS | NOCOMPRESS] |
... |
Horizontal ellipsis points indicate either:
|
CREATE TABLE ... AS subquery; SELECT col1, col2, ... , coln FROM employees; |
. . . |
Vertical ellipsis points indicate that we have omitted several lines of code not directly related to the example. |
SQL> SELECT NAME FROM V$DATAFILE; NAME ------------------------------------ /fsl/dbs/tbs_01.dbf /fs1/dbs/tbs_02.dbf . . . /fsl/dbs/tbs_09.dbf 9 rows selected. |
Other notation | You must enter symbols other than brackets, braces, vertical bars, and ellipsis points as shown. |
acctbal NUMBER(11,2); acct CONSTANT NUMBER(4) := 3; |
Italics |
Italicized text indicates placeholders or variables for which you must supply particular values. |
CONNECT SYSTEM/system_password DB_NAME = database_name |
UPPERCASE |
Uppercase typeface indicates elements supplied by the system. We show these terms in uppercase in order to distinguish them from terms you define. Unless terms appear in brackets, enter them in the order and with the spelling shown. However, because these terms are not case sensitive, you can enter them in lowercase. |
SELECT last_name, employee_id FROM employees; SELECT * FROM USER_TABLES; DROP TABLE hr.employees; |
lowercase |
Lowercase typeface indicates programmatic elements that you supply. For example, lowercase indicates names of tables, columns, or files.
Note: Some programmatic elements use a mixture of UPPERCASE and lowercase. Enter these elements as shown. |
SELECT last_name, employee_id FROM employees; sqlplus hr/hr CREATE USER mjones IDENTIFIED BY ty3MU9; |