Oracle9i Application Developer's Guide - XML Release 1 (9.0.1) Part Number A88894-01 |
|
This section describes the new features in the following releases:
Here are the new XML features in Oracle9i Release 1 (9.0.1):
XSU is also considered part of the XDK for Java and XDK for PL/SQL.
Extensible Markup Language (XML) is a standard format developed by the World Wide Web Consortium (W3C) for representing structured and unstructured data on the Web. Universal Resource Identifiers (URIs) identify resources such as Web pages anywhere on the Web. Oracle provides types to handle XML and URI data, as well as a class of URIs called DBUri-REF
s to access data stored within the database itself. It also provides a new set of types to store and access both external and internal URIs from within the database.
This (new) Oracle-supplied type can be used to store and query XML data in the database. XMLType
has member functions you can use to access, extract, and query the XML data using XPath expressions. XPath is another standard developed by the W3C committee to traverse XML documents. Oracle XMLType
functions support a subset of the W3C XPath expressions. Oracle also provides a set of SQL functions (including SYS_XMLGEN
and SYS_XMLAGG
) and PL/SQL packages (including DBMS_XMLGEN
) to create XMLType
values from existing relational or object relational data.
XMLType
is a system-defined type, so you can use it as an argument of a function or as the datatype of a table or view column. When you create a XMLType
column in a table, Oracle internally uses a CLOB
to store the actual XML data associated with this column. As is true for all CLOB
data, you can make updates only to the entire XML document. You can create an Oracle Text index or other function-based index on a XMLType
column.
Oracle supplies a family of URI types--UriType
, DBUriType
, and HttpUriType
--which are related by an inheritance hierarchy. UriType
is an object type and the others are subtypes of UriType
.
HttpUriType
to store URLs to external web pages or to files. It accesses these files using HTTP (Hypertext Transfer Protocol).
DBUriType
can be used to store DBUri-REF
s, which reference data inside the database. Since UriType
is the supertype, you can create columns of this type and store DBUriType
or HttpUriType
type instances in this column. Doing so lets you reference data stored inside or outside the database and access the data consistently.
DBUri-REF
s use an XPath-like representation to reference data inside the database. If you imagine the database as a XML tree, then you would see the tables, rows, and columns as elements in the XML document. For instance, the sample human resources user hr
would see the following XML tree:
<HR> <EMPLOYEES> <ROW> <EMPLOYEE_ID>205</EMPLOYEE_ID> <LAST_NAME>Higgins</LAST_NAME> <SALARY>12000</SALARY> .. <!-- other columns --> </ROW> ... <!-- other rows --> </EMPLOYEES> <!-- other tables..--> </HR> <!-- other user schemas on which you have some privilege on..-->
The DBUri-REF
is simply an XPath expression over this virtual XML document. So to reference the SALARY
value in the EMPLOYEES
table for the employee with employee number 205, we can write a DBUri-REF
as,
/HR/EMPLOYEES/ROW[EMPLOYEE_ID=205]/SALARY
Using this model, you can reference data stored in CLOB
columns or other columns and expose them as URLs to the external world. Oracle provides a standard URI servlet that can interpret such URLs. You can install and run this servlet under the Oracle Servlet engine.
UriFactoryType
is a factory type, which is a type that can create and return other object types. When given a URL string, UriFactoryType
can create instances of the various subtypes of the UriTypes
. It analyzes the URL string, identifies the type of URL (HTTP, DBUri
, and so on) and creates an instance of the subtype.
Metadata API (new) provides a centralized, simple and flexible means for performing the following tasks:
Metadata API is available on Oracle9i whenever the instance is operational. It is not available on Oracle Lite. It includes the (new) DBMS_METADATA PL/SQL supplied package.
The new Oracle Text section group, PATH_SECTION_GROUP, enables new and more sophisticated section searching for XML documents. PATH_SECTION_GROUP supports the following:
The new Oracle Text operators are:
New XML features introduced in Oracle8i, Release 3 (8.1.7) were enhanced and improved versions of the following components:
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|