You are on page 1of 36

Oracle Database 11g XML DB

1echnical O·er·iew


.v Oracte !bite Paper
¡vty 200¨

Oracle Database 11g XML DB 1echnical O·er·iew
Introduction........................................................................................... 1
Why XML? ....................................................................................... 1
Data Exchange and Integration..................................................... 1
XML-Centric Application Development ...................................... 1
Management oI Content and Metadata......................................... 2
REQUIREMENTS FOR SERVER-BASED XML SUPPORT........ 2
Oracle XML DB Architecture .............................................................. 3
XMLType Storage Models ............................................................... 3
Oracle XML DB Repository............................................................. 4
Oracle XML DB Protocol Architecture........................................ 5
APIs Ior Oracle XML DB (Java. PL/SQL. ODP.NET. and C) ........ 6
Oracle XML DB Capabilities ............................................................... 6
XMLType ......................................................................................... 6
Structured. Binary XML. and Unstructured Storage Models ........... 7
Structured Storage......................................................................... 8
Binary XML Storage .................................................................... 8
Unstructured Storage .................................................................... 9
Guidelines Ior Choosing the Storage Models ............................. 10
Using Indexes to Improve PerIormance ......................................... 11
B-Tree Index............................................................................... 13
XML Indexes .............................................................................. 13
XML Schema.................................................................................. 14
W3C Schema Ior Schemas.......................................................... 14
XML Schema Base Set oI Data Types Can be Extended........... 15
XML Schema UniIies Document Modeling and Data Modeling15
Create XMLType Tables and Columns. Ensure DOM Fidelity . 15
Schema Evolution....................................................................... 15
Using XQuery to Query. TransIorm. and Access XML and
Relational Data ............................................................................... 16
SQL/XML XQuery Functions .................................................... 18
Rewrite Ior XQuery .................................................................... 18
SQL/XML Duality.......................................................................... 19
SQL Standard SQL/XML Functions .......................................... 20
Relational Views Irom XML Data and XML Views Irom
Relational Data ........................................................................... 20
XMLType Update. TransIormation. and DiII/Patch Operations.... 21

Update XML Content Stored in Oracle XML DB...................... 21
XSL TransIormation and Oracle XML DB................................ 22
Comparing and Patching XML Documents with XMLDiII and
XMLPatch................................................................................... 22
Full-Text Search oI XML Data....................................................... 23
Oracle XML DB Repository........................................................... 23
Foldering..................................................................................... 23
Resource Versioning................................................................... 24
Repository Resource Security..................................................... 25
Repository Metadata................................................................... 25
Repository Events ....................................................................... 26
XLink and XInclude ................................................................... 27
Oracle XML DB Repository APIs.............................................. 28
Internet Protocols Support .......................................................... 28
Native Oracle XML DB Web Services....................................... 29
End-to-End High PerIormance Programming Langauge APIs Ior
Oracle XML DB ............................................................................. 29
Oracle XML DB Application Development tools .............................. 29
Using Oracle SQL Developer Ior Database-Tier Development ..... 30
Using Oracle JDeveloper Ior SOA Application Development ....... 30
Oracle XML DB LiIe Cycle management Tools................................ 30
SQL*Loader Support ...................................................................... 30
Export/Import Support .................................................................... 30
Exporting and Importing Transportable Tablespaces................. 30
Support Ior XMLType by Oracle Streams and Logical Standby ... 31
Oracle Enterprise Manager Support ............................................... 31
Conclusion .......................................................................................... 31
OracIe Database 11g XML DB TechnicaI Overview Page 1

Oracle Database 11g XML DB 1echnical O·er·iew
INTRODUCTION
Oracle XML DB has been widelv adopted bv customers and partners íor a broad
spectrum oí use cases with ·aried requirements since its introduction íi·e vears ago.
Oracle XML DB has also been making strides o·er the vears to oííer the most
comprehensi·e standards-based XML storage. retrie·al. and publishing capabilities
on a high períormance. reliable. a·ailable. scalable. and secure relational platíorm.
Why XML?
XML is an open standard that pro·ides a uniíied model íor data. content and
metadata. It is selí describing and easilv readable bv both humans and machines. It
is ·endor-neutral and extensible. 1hese íeatures ha·e led to its adoption bv a wide
range oí industries. Most XML usage íalls into one oí the íollowing three
categories. each oí which is discussed below:
• Data exchange and integration
• XML-centric application de·elopment
• Management oí content and metadata
In an enterprise en·ironment. it is a common requirement to bring these usage
categories together in iníormation processing ílows.
Data Exchange and Integration
Bv some estimates 40° oí a tvpical I1 budget is consumed bv integration eííorts.
1he use oí looselv coupled. ílexible. XML-based integration has consistentlv
demonstrated signiíicant cost sa·ings and reduction in time-to-market when
compared with more tightlv coupled alternati·es. 1he success oí this approach is
particularlv ·isible in the growth oí XML messaging in ser·ice-orientated
architectures SOA,. Organizations are also starting to realize that thev need to
preser·e some oí this transient XML in order to meet regulatorv and compliance
requirements.
XML-Centric AppIication DeveIopment
XML has replaced proprietarv LDI techniques as the de-íacto standard íor
iníormation exchange in a large number oí ·ertical industries. 1he data structures
deíined bv these standards are tvpicallv quite complex. containing recursi·e
OracIe XML DB has been wideIy adopted
by customers and partners for a broad
spectrum of use cases with varied
requirements since its introduction five
years ago.
OracIe Database 11g XML DB TechnicaI Overview Page 2

structures and other complex constructs that ha·e pro·en diííicult to map to a
purelv relational model. 1hese data structures are oíten described using the \3(
XML Schema standard
1
. As the ·olume and complexitv oí the XML increases. the
costs and o·erhead oí mapping between the XML and relational representations oí
the data grows exponentiallv. Manv organizations are looking to reduce
de·elopment costs bv storing this data directlv as XML in the database.
Management of Content and Metadata
O·er the past íew vears. se·eral high-end document-authoring svstems. including
Adobe`s lramemaker. ha·e migrated írom using proprietarv íormats or SGML to
XML. More recentlv. desktop producti·itv tools such as Open Oííice
2
and
Microsoít Oííice ha·e switched to storing their documents as XML. 1his is leading
to a growth in XML content that organizations need be able to manage eííecti·elv.
1he ílexibilitv oí XML also makes it attracti·e as a medium íor managing metadata
about other íorms oí content.
REQUIREMENTS FOR SERVER-BASED XML SUPPORT
Database customers need a platíorm that deli·ers períormance and the abilitv to
easilv de·elop the next generation oí XML-centric applications. 1hev need to be
able to use that platíorm together with the latest XML standards and application
de·elopment techniques. As the ·olume and mission critical nature oí the XML
increases. organizations need the abilitv to search it in an eííicient manner. and to
manage it with the same rigor and ease as other tvpes oí corporate data. 1hev need
an XML platíorm that deli·ers the same le·els oí períormance. reliabilitv.
a·ailabilitv. scalabilitv. and securitv as their existing relational databases.
\hen existing database technologv e·ol·es to meet these XML requirements. the
result is a hvbrid platíorm. equallv capable oí managing XML and relational data.
1his reduces the complexitv oí data and business processes. leading to signiíicant
cost sa·ings. and helps a·oid the risks inherent in introducing new inírastructure
into an organization. 1o be trulv eííecti·e. such a hvbrid database also needs to
support the XML standards that make the process oí generating. loading. updating.
retrie·ing. transíorming and indexing XML as simple and períormant as possible.
Oracle Database. with Oracle XML DB. is a pro·en hvbrid database íor managing
both XML and relational data. Oracle XML DB has been an integral part oí Oracle
Database íor se·eral vears and íour major database releases. Customers have
successIully deployed XML-centric applications on Oracle XML DB.
Oracle is leaping ahead in this release bv introducing a new storage model - the
binarv XML storage model. and salient new capabilities such as XML indexes. in-
place XML schema e·olution. database-nati·e web ser·ices. compound documents.
and much more.

1
http:´´www.w3c.org
2
http:´´xml.openoííice.org´
OracIe Database, with OracIe XML DB, is a
proven hybrid database for managing both
XML and reIationaI data. OracIe XML DB
has been an integraI part of OracIe
Database for severaI years and four major
database reIeases.
OracIe Database 11g XML DB TechnicaI Overview Page 3

ORACLE XML DB ARCHITECTURE
Oracle XML DB is built on the core components oí XML1vpe abstraction. XML
DB repositorv. standard querv languages. API support. and protocol support. Lach
component pro·ides a rich set oí ser·ices íor the essential aspects oí Oracle XML
DB. \e will take a closer look at these components in the íollowing sections.
XMLType Storage ModeIs
Oracle XML DB supports comprehensi·e storage models i.e.. structured.
unstructured. and binarv XML storage models, to ser·e di·erse XML use cases
with diííerent requirements. Although the majoritv oí current customers` use cases
are data-centric and hence structured storage is ideal. lowe·er. we ha·e seen
steadv growth in document-centric use cases where binarv XML and XML indexes
will make a substantial diííerence.
As XML co·ers both structured and unstructured data íor diííerent use cases.
Oracle XML DB customers ha·e been using diííerent storage and indexing options
íor XML with diííerent characteristics to achie·e optimal data storage and querv.
1here is no one-size-íits-all solution íor such ·arietv oí use cases. 1he íigure below
shows a diagram oí real world XML use cases and corresponding XML storage
models and indexing options pro·ided bv Oracle XML DB.
OracIe XML DB is buiIt on the core
components of XMLType abstraction, XML
DB repository, standard query Ianguages,
API support, and protocoI support.
As XML covers both structured and
unstructured data for different use cases,
OracIe XML DB customers have been
using different storage and indexing
options for XML with different
characteristics to achieve optimaI data
storage and query. There is no one-size-
fits-aII soIution for such variety of use
cases.
OracIe Database 11g XML DB TechnicaI Overview Page 4











In the íigure. the ·ertical column indicates whether the document is mainlv data-
centric or document-centric. 1he horizontal column indicates whether the
document contains structured or unstructured components inside it. 1he right
upper quadrant represents data-centric XML íor which the object-relational
schema-aware storage model along with B-tree indexes would be the right choice.
1he leít upper quadrant represents data-centric XML with certain unstructured
íragments. lor this use case. using the object-relational storage as the o·erall
storage model with unstructured parts stored as (LOB using XML indexes would
be the ideal storage model. 1he leít lower quadrant represents completelv
document-centric XML íor which the binarv XML or (LOB storage model with
XML indexes are recommended. 1he right lower quadrant represents document-
centric XML with certain structured parts. 1he binarv XML or (LOB storage
model along with a XML indexes íor the structured part works best.
OracIe XML DB Repository
1he relational model oí the table-row-column metaphor is accepted as an eííecti·e
mechanism íor managing structured data. 1he model is not as eííecti·e íor
managing semi-structured and unstructured data. such as document-oriented XML.
lor example. a book is not easilv represented as a set oí rows in a table. It is more
natural to represent a book as a hierarchv. book:chapter:section:paragraph. and to
represent the hierarchv as a set oí íolders and subíolders.
Oracle XML DB Repositorv is a component oí Oracle Database that is optimized
íor handling XML data as íiles in a íile svstem. 1he Oracle XML DB repositorv
contains resources. which can be either íolders directories. containers, or íiles.
Lach resource has these properties:
• It is identiíied bv a path and name.
• It has content data,. which can be XML data but need not be.
• It has a set oí svstem-deíined metadata properties,. such as Owner and
(reationDate. in addition to its content. Oracle XML DB uses this iníormation
to manage the resource.
• It might also ha·e user-deíined metadata: iníormation that is not part oí the
content. but is associated with it.
• It has an associated access-control list that speciíies who can access the
resource. and íor what operations.
OracIe XML DB Repository is a component
of OracIe Database that is optimized for
handIing XML data as fiIes in a fiIe system.
Data-Centric



Document-Centric
unstructured structured
Parts of the document
Binary XML or CLOB Storage

XML and Full-Text Indexes

Hybrid (Obiect-Relational and CLOB)

B-Tree. XML. and Full-Text Indexes
Obiect-Relational Storage

B-Tree Indexes
Binary XML or CLOB Storage

XML and Full-Text Indexes

OracIe Database 11g XML DB TechnicaI Overview Page 5

Although Oracle XML DB Repositorv treats XML content speciallv. vou can use
Oracle XML DB Repositorv to store other kinds oí data. besides XML: vou can
use the repositorv to access anv data that is stored in Oracle Database.
\ou can access data in Oracle XML DB Repositorv in the íollowing wavs:
• Using SOL. through ·iews RLSOUR(L_VIL\ and PA1l_VIL\
• Using PL´SOL. through the DBMS_XDB API
• Using Ja·a. through the standard JSR 1¯0 (ontent Repositorv API or the
Oracle XML DB resource API íor Ja·a
Besides supporting APIs that access and manipulate data. Oracle XML DB
Repositorv pro·ides APIs íor the íollowing ser·ices:
• Versioning - Oracle XML DB uses the DBMS_XDB_VLRSION PL´SOL
package íor ·ersioning resources in Oracle XML DB Repositorv. Subsequent
updates to a resource create a new ·ersion the data corresponding to pre·ious
·ersions is retained,. Versioning support is based on the IL1l \ebDAV
standard.
• A(L Securitv - Oracle XML DB resource securitv is based on access-control
lists A(Ls,. L·erv resource in Oracle XML DB has an associated A(L that
lists its pri·ileges. \hene·er resources are accessed or manipulated. the A(Ls
determine ií the operation is legal. An A(L is an XML document that contains
a set oí access-control entries A(Ls,. Lach A(L grants or re·okes a set oí
permissions to a particular user or group database role,. 1his access-control
mechanism is based on the \ebDAV speciíication.
• loldering - Oracle XML DB Repositorv manages a persistent hierarchv oí
íolder directorv, resources that contain other resources íiles or íolders,.
Oracle XML DB modules. such as protocol ser·ers. the schema manager. and
the Oracle XML DB RLSOUR(L_VIL\ API. use íoldering to map path
names to resources.
OracIe XML DB ProtocoI Architecture
\ou can access XML documents in Oracle XML DB Repositorv using standard
connect-access protocols such as l1P. l11PS,. and \ebDAV. in addition to
SOL. PL´SOL. Ja·a. and ( languages. 1he repositorv pro·ides content authors and
editors direct access to XML content stored in Oracle Database.
A resource in this context is a íile or íolder. identiíied bv a URL. \ebDAV is an
IL1l standard that deíines a set oí extensions to the l11P protocol. It allows an
l11P ser·er to act as a íile ser·er íor a DAV-enabled client. lor example. a
\ebDAV-enabled editor can interact with an l11P´\ebDAV ser·er as ií it were
a íile svstem. 1he \ebDAV standard uses the term resource to describe a íile or a
íolder. Lach resource managed bv a \ebDAV ser·er is identiíied bv a URL. Oracle
XML DB adds nati·e support to Oracle Database íor these protocols. 1he
You can access XML documents in OracIe
XML DB Repository using standard
connect-access protocoIs such as FTP,
HTTP(S), and WebDAV, in addition to SQL,
PL/SQL, Java, and C Ianguages.
OracIe Database 11g XML DB TechnicaI Overview Page 6

protocols were designed íor document-centric operations. Bv pro·iding support íor
these protocols. Oracle XML DB allows \indows Lxplorer. Microsoít Oííice. and
products írom ·endors such as Alto·a. Macromedia. and Adobe to work directlv
with XML content stored in Oracle XML DB Repositorv.
One kev íeature oí the Oracle XML DB architecture is that l11PS,. \ebDAV.
and l1P protocols are supported using the same architecture used to support
Oracle Data Pro·ider íor .NL1 ODP.NL1, in a shared ser·er coníiguration. 1he
Listener listens íor l11PS, and l1P requests in the same wav that it listens íor
ODP.NL1 ser·ice requests. \hen the Listener recei·es an l11PS, or l1P
request. it hands it oíí to an Oracle Database shared ser·er process which ser·ices
it and sends the appropriate response back to the client.\ou can use the 1NS
Listener command lsnrctl status to ·eriív that l11PS, and l1P support has been
enabled.
APIs for OracIe XML DB (Java, PL/SQL, ODP.NET, and C)
Oracle XML DB is accessible írom popular programming language APIs. such as
Ja·a. PL´SOL. and (. It pro·ides Ja·a. PL´SOL. and ( implementations oí the
DOM API.Applications that use JDB(. such as those based on ser·lets. need prior
knowledge oí the data structure thev are processing. Oracle JDB( dri·ers allow vou
to access and update XML1vpe tables and columns. and call PL´SOL procedures
that access Oracle XML DB Repositorv.Applications that use DOM. such as those
based on XSL1 transíormations. tvpicallv require less knowledge oí the data
structure. DOM-based applications use string names to identiív pieces oí content.
and must dvnamicallv walk through the DOM tree to íind the required iníormation.
lor this. Oracle XML DB supports the use oí the DOM API to access and update
XML1vpe columns and tables. Programming to a DOM API is more ílexible than
programming through JDB(. but it mav require more resources at run time.
ORACLE XML DB CAPABILITIES
\ith the architecture described in pre·ious sections. we will now íocus on in·idual
capabilities oí Oracle XML DB.
XMLType
1o pro·ide ílexibilitv and ·ersatilitv. Oracle XML DB is built upon the XML1vpe
abstraction íor storing. querving. accessing. transíorming. and manipulating XML
data.
XML1vpe is a nati·e data tvpe íor XML data. It pro·ides methods that allow
operations such as XML schema ·alidation and XSL transíormation on XML
content. \ou can use XML1vpe as vou would anv other data tvpe. lor example.
vou can use XML1vpe when vou do anv oí the íollowing:
• (reating a column in a relational table
• Declaring PL´SOL ·ariables
XMLType is a native data type for XML
data. It provides methods that aIIow
operations such as XML schema vaIidation
and XSL transformation on XML content.
OracIe Database 11g XML DB TechnicaI Overview Page 7

• Deíining and calling PL´SOL procedures and íunctions
XML1vpe is also an object tvpe. so vou can also create a table oí XML1vpe
instances. Bv deíault. an XML1vpe table or column can contain anv well-íormed
XML document.
XML1vpe tables or columns can be constrained to coníorm to an XML schema.
1his has se·eral ad·antages:
• 1he database ensures that onlv XML documents that ·alidate against the XML
schema are stored in the column or table.
• Since the contents oí the table or column coníorm to a known XML structure.
Oracle XML DB can use the iníormation contained in the XML schema to
pro·ide optimized querv and update processing oí the XML.
• \ou ha·e the option oí storing the XML document content using structured
storage. 1his decomposes the document and stores it as a set oí object-
relational objects. 1he object-relational model used to store the document is
deri·ed írom the XML schema.
Structured, Binary XML, and Unstructured Storage ModeIs
XML1vpe is an abstract data tvpe that allows íor diííerent storage models to best íit
vour data and vour use case. As an abstract data tvpe. vour applications and
database queries gain in ílexibilitv. because the same interíace is a·ailable íor all
XML1vpe operations. Oracle XML DB supports diííerent storage persistence,
models íor vou to optimize períormance and íunctionalitv bv selecting a storage
model that best íit the kind oí XML data vou ha·e and the pattern oí its use.
1hereíore. one kev decision to make when using Oracle XML DB íor persisting
XML data as XML1vpe is which storage model to use íor which XML data.
\ou can change XML1vpe storage írom one model to another. using database
import´export. \our application code does not need to be changed. \ou can
change XML storage options when tuning vour application: each storage option has
its own beneíits.
XML1vpe tables and columns can be stored in the íollowing wavs:
• Structured storage - XML1vpe data is stored as a set oí objects. 1his is also
reíerred to as object-relational storage and object-based persistence.
• Binarv XML storage - XML1vpe data is stored in a post-parse. binarv íormat
speciíicallv designed íor XML data. Binarv XML is compact. post-parse. XML
schema-aware íormat. 1his is also reíerred to as post-parse persistence.
• Unstructured storage - XML1vpe data is stored in (haracter Large Object
(LOB, instances. 1his is also reíerred to as (LOB storage and text-based
persistence.
In addition. the structured and the unstructured storage can also be used together
in a hybrid storage. 1he structured part oí a hvbrid storage takes ad·antage oí the
OracIe Database 11g XML DB TechnicaI Overview Page 8

structured storage capabilities. and the unstructured part oí a hvbrid storage makes
use oí the unstructured storage ad·antages.
Both the binarv XML and the unstructured storage support two LOB-storage
options. Securelile and Basiclile. Securelile is a re·olutionarv new capabilitv in this
release to pro·ide high períormance and scalable storage and retrie·al oí semi-
structured and unstructured data.
Lach storage model has its ad·antages. depending on the use case and the
characteristics oí the XML data.
Structured Storage
Structured storage ad·antages o·er unstructured storage include optimized memorv
management. reduced storage requirements. B-tree indexing. and in-place updates.
1hese ad·antages are at a cost oí increased processing o·erhead during ingestion
and retrie·al oí XML data. and reduced ílexibilitv in the structure oí the XML that
can be managed bv a gi·en XML1vpe table or column. Structural ílexibilitv is
reduced because data and metadata such as column names, are separated in object-
relational storage: instance structures cannot ·arv easilv. Structured storage is
particularlv appropriate íor highlv structured data that does not change oíten.
pro·ided that this maps to a manageable number oí database tables and joins.
Binary XML Storage
Binarv XML storage pro·ides more eííicient database storage. updating. indexing.
and íragment extraction than unstructured storage. It can pro·ide better querv
períormance than unstructured storage - it does not suííer írom the XML
parsing bottleneck it is a post-parse persistence model,. Like structured storage.
binarv XML storage can also be made aware oí XML Schema data tvpes and can
take ad·antage oí nati·e database data tvpes. Like unstructured storage. no data
con·ersion is needed during database insertion or retrie·al. Like structured storage.
binarv XML storage allows íor piecewise updates. Because binarv XML data can
also be used outside the database. it can ser·e as an eííicient XML exchange
medium. and vou can oííload work írom the database to increase o·erall
períormance in manv cases. Like unstructured storage. binarv XML data is kept in
document order. Like structured storage. data and metadata can. using binarv
storage. be separated at the database le·el. íor eííiciencv. Like unstructured storage.
howe·er. binarv storage allows íor intermingled data and metadata. which lets
instance structures ·arv. Binarv XML storage allows íor ·erv complex and ·ariable
data. which in the structured-storage model could necessitate using manv database
tables and joins. Unlike the other XML1vpe storage models. vou can use binarv
storage íor XML schema-based data e·en ií the XML schema is not known
beíorehand. and vou can store multiple XML schemas in the same table and querv
across common elements.
Binary XML storage provides more
efficient database storage, updating,
indexing, and fragment extraction than
unstructured storage.
OracIe Database 11g XML DB TechnicaI Overview Page 9

\hen vou insert XML schema-based data into binarv XML1vpe columns or tables.
the data is íullv ·alidated against the XML schema. Insertion íails ií the data is
in·alid.
Binarv XML storage is the closest thing to a uni·ersal storage model íor XML data
- vou can use it eííecti·elv íor a ·erv wide range oí use cases. írom document-
centric to data-centric.
Streaming XML Schema Validation
XML schema ·alidation had been a costlv step in XML processing. \ith binarv
XML storage option. schema ·alidation is períormed with a new streaming
implementation. Streaming XML schema ·alidation requires much less memorv.
1hereíore it períorms much more eííicientlv and scales well when ·alidating large
number oí XML documents or large sized XML documents.
Streaming XPath processing
1he streaming XPath engine is implemented as an NlA non-deterministic íinite
automata,. 1he set oí XPaths can be compiled awav into a state machine and then
multiple instance documents can be íed one aíter the other to e·aluate all the
XPaths in one streaming pass.
Partial updates
Users can update XML documents stored in binarv íormat using the regular SOL
UPDA1L statements along with the partial update SOL operators such as
UPDA1LXML. INSLR1XMLBLlORL. APPLND(lILDXML and
DLLL1LXML. \hen the user updates onlv a small part oí the original document.
the svstem optimizes the update bv replacing onlv the aííected portions oí the
document instead oí replacing the entire document. 1his íunctionalitv relies on the
abilitv to períorm sliding inserts i.e. updating a portion oí the underlving BLOB
without replacing the entire (LOB ·alue, using the Securelile storage option. 1he
partial update optimization is entirelv transparent in terms oí user svntax and
semantics. 1he beneíits are better períormance due to lesser I´O and logging
o·erheads.
Unstructured Storage
Unstructured storage allows higher throughput than structured storage when
inserting and retrie·ing entire XML documents. No data con·ersion is needed. so
the same íormat can be used outside the database. Unstructured storage also
pro·ides greater ílexibilitv than structured storage in the structure oí the XML that
can be stored. Unstructured storage is particularlv appropriate íor document-centric
use cases. 1hese ad·antages can come at the expense oí certain aspects oí
intelligent processing. lor example. in the absence oí indexing. there is little that
the database can do to optimize queries or updates on XML data that is stored in a
(LOB instance. In particular. the cost oí XML parsing oíten implicit, can
OracIe Database 11g XML DB TechnicaI Overview Page 10

signiíicantlv impact querv períormance. Indexing with XMLIndex can impro·e the
períormance oí queries against unstructured storage.
GuideIines for Choosing the Storage ModeIs
Relati·e ad·antages oí each storage model. guidelines íor choosing storage models
íor gi·en use cases.

Structured
Storage Binary Storage
Unstructured
Storage
1hroughput - XML
decomposition
can result in
reduced
throughput when
ingesting
retrie·ing the
entire content oí
an XML
document.
-- ligh
throughput. last
DOM loading.
- ligh
throughput when
ingesting and
retrie·ing the
entire content oí
an XML
document.
Space
eííiciencv
disk,
-- Lxtremelv
space-eííicient.
- Space-eííicient. - (onsumes the
most disk space.
due to
insigniíicant
white spaces and
repeated tags.
Data
ílexibilitv
- Limited
ílexibilitv. Onlv
documents that
coníorm to the
XML schema can
be stored in the
XML1vpe table or
column.
- llexibilitv in the
structure oí the
XML documents
that can be stored
in an XML1vpe
column or table.
- llexibilitv in
the structure oí
the XML
documents that
can be stored in
an XML1vpe
column or table.
XML
schema
ílexibilitv
- Relati·elv
inílexible. Data
and metadata are
stored separatelv.
(annot use
multiple XML
schemas íor the
same XML1vpe
-- llexible. (an
store data and
metadata together
or separatelv. (an
use multiple XML
schemas íor the
same XML1vpe
table.
- llexible. Data
and metadata are
stored together.
(annot use
multiple XML
schemas íor the
same XML1vpe
table.
OracIe Database 11g XML DB TechnicaI Overview Page 11


Structured
Storage Binary Storage
Unstructured
Storage
table.
XML íidelitv - DOM íidelitv: A
DOM created
írom an XML
document that has
been stored in the
database will be
identical to a
DOM created
írom the original
document.
lowe·er.
insigniíicant
whitespace mav be
discarded.
- DOM íidelitv
see structured
storage
description,.
- Document
íidelitv: Maintains
the original XML
data. bvte íor
bvte. In
particular. all
original
whitespace is
preser·ed.
Update
operations
DML,
-- In-place.
piecewise update.
- In-place.
piecewise update
íor Securelile
LOB storage.
- \hen anv part
oí the document
is updated. the
entire document
must be written
back to disk.
XOuerv- and
XPath-based
queries
-- XPath
operations can
oíten be e·aluated
using XPath
rewrite. leading to
signiíicantlv
impro·ed
períormance.
particularlv with
large collections
oí documents.
- Streaming
XPath e·aluation
a·oids DOM
construction and
allows e·aluation
oí multiple XPath
expressions in a
single pass.
Na·igational
XPath e·aluation
is signiíicantlv
íaster than with
unstructured
storage.
XMLIndex indexing
can íurther
impro·e querv
- XPath
operations are
e·aluated bv
constructing a
DOM írom the
(LOB data and
using íunctional
e·aluation.
Lxpensi·e when
períorming
operations on
large documents
or large
collections oí
documents.
XMLIndex
indexing can
íurther impro·e
OracIe Database 11g XML DB TechnicaI Overview Page 12


Structured
Storage Binary Storage
Unstructured
Storage
períormance. querv
períormance.
SOL
constraint
support
- SOL constraints
are supported.
- SOL constraints
are supported.
- SOL
constraints are
not a·ailable.
Support íor
SOL scalar
data tvpes
- \es - \es - No
Indexing
support
B-tree. Oracle
1ext. and
íunction-based
indexes.
XMLIndex.
íunction-based.
and Oracle 1ext
indexes.
XMLIndex.
íunction-based.
and Oracle 1ext
indexes.
Optimized
memorv
management
- XML
operations can be
optimized to
reduce memorv
requirements.
- XML operations
can be optimized
to reduce memorv
requirements.
- XML
operations on the
document require
creating a DOM
írom the
document.
Validation
upon insert
XML data is
partiallv ·alidated
when it is
inserted.
- XML schema-
based data is íullv
·alidated when it
is inserted.
XML schema-
based data is
partiallv ·alidated
when it is
inserted.

Using Indexes to Improve Performance
lor diííerent storage models. Oracle XML DB supports the creation oí a ·arietv oí
indexes on XML content:
• B-1ree indexes. \hen the XML1vpe table or column is based on structured
storage techniques. con·entional B-1ree indexes can be created on underlving
SOL tvpes.
• XML indexes. XMLIndex pro·ides a general. XML-speciíic index
that indexes the internal structure oí XML data using binarv XML.
unstructured. and hvbrid storage.
OracIe Database 11g XML DB TechnicaI Overview Page 13

• Iunction-based indexes. 1hese can be created on anv XML1vpe table or
column. Its usage is limited to pre-deíined XPath queries on unstructured
storage.
• Iull-1ext indexes. 1hese can be created on anv XML1vpe table or column.
B-Tree Index
B-tree indexes are tvpicallv created bv using SOL íunction extractValue. although it
is also possible to create indexes based on other íunctions such as existsNode.
During the index creation process Oracle XML DB uses XPath rewrite to
determine whether it is possible to map between the nodes reíerenced in the XPath
expression used in the (RLA1L INDLX statement and the attributes oí the
underlving SOL tvpes. Ií the nodes in the XPath expression can be mapped to
attributes oí the SOL tvpes. then the index is created as a con·entional B-1ree
index on the underlving SOL objects. Ií the XPath expression cannot be restated
using object-relational SOL then a íunction-based index is created.
XML Indexes
XMLIndex pro·ides a general. XML-speciíic index that indexes the internal
structure oí XML data. One oí its main purposes is to o·ercome the indexing
limitation presented bv unstructured and hvbrid storage oí XML data. that is.
(LOB storage. It does this bv indexing the XML tags oí vour document and
identiíving document íragments based on XPath expressions that target them. It
can also index scalar node ·alues. to pro·ide quick lookup based on indi·idual
·alues or ranges oí ·alues. It also records document hierarchv iníormation íor each
node it indexes relations oí parent-child. ancestor-descendant. and sibling.
Index size reduction from path subsetting
One oí the ad·antages oí XMLIndex is that it is ·erv general: vou need not speciív
which XPath locations to index: vou need no prior knowledge oí the XPath
expressions that will be queried. Bv deíault. XMLIndex indexes all possible XPath
locations in vour XML data.
lowe·er. ií vou are aware oí the XPath expressions that vou are most likelv to
querv. vou can narrow the íocus oí XMLIndex indexing and thus impro·e
períormance. la·ing íewer unnecessarv indexes means that less space is required
íor indexing. which impro·es index maintenance during DML operations. la·ing
íewer indexed nodes impro·es DDL períormance. and ha·ing a smaller path table
impro·es querv períormance.
\ou narrow the íocus oí indexing bv pruning the set oí XPath expressions paths,
corresponding to XML íragments to be indexed. speciíving a subset oí all possible
paths. \ou can do this in two alternati·e wavs:
• Lxclusion - Start with the deíault beha·ior oí including all possible XPath
expressions. and exclude some oí them írom indexing.
XMLIndex provides a generaI, XML-
specific index that indexes the internaI
structure of XML data.
OracIe Database 11g XML DB TechnicaI Overview Page 14

• Inclusion - Start with an emptv set oí XPath expressions to be used in
indexing. and add paths to this inclusion set.
\ou can speciív path subsetting either when vou create an XMLIndex index using
(RLA1L INDLX or when vou modiív it using AL1LR INDLX. In both cases. vou
pro·ide the subsetting iníormation in the PA1lS parameter oí the statement's
PARAML1LRS clause. lor exclusion. vou use kevword LX(LUDL. lor inclusion.
vou use kevword IN(LUDL íor AL1LR INDLX and no kevword íor (RLA1L
INDLX list the paths to include,. \ou can also speciív namespace mappings íor
the nodes targeted bv the PA1lS parameter.
Asynchronous Index Maintenance
Bv deíault. XMLIndex indexing is maintained at each DML operation. so that it
remains in svnc with the base table. In some situations. vou might not require this.
and using possiblv stale indexes might be acceptable. In that use case. vou can
decide to deíer the cost oí index maintenance. períorming at commit time onlv or
at some time when database load is reduced. 1his can impro·e DML períormance.
It can also impro·e index maintenance períormance bv enabling bulk loading oí
unsvnchronized index rows when an index is svnchronized.
Using XMLIndex on Oracle XML DB Repository
A database administrator can create an XMLIndex index on resources in Oracle
XML DB Repositorv to impro·e querving oí XML data or metadata svstem-
deíined or user-deíined,. 1he DBMS_XDB_ADMIN package includes procedures
íor creating and maintaining XMLIndex indexes on Oracle XML DB Repositorv.
Aíter an XMLIndex has been created. a querv on resources will be able to take
ad·antage oí it íor optimal querv execution.
XML Schema
Support íor the \orldwide \eb (onsortium \3(, XML Schema
Recommendation is a kev íeature in Oracle XML DB. XML Schema speciíies the
structure. content. and certain semantics oí a set oí XML documents.
W3C Schema for Schemas
1he \3( Schema \orking Group publishes an XML schema. oíten reíerred to as
the "schema íor schemas". 1his XML schema pro·ides the deíinition. or
·ocabularv. oí the XML Schema language. An XML schema deíinition XSD, is an
XML document. that is compliant with the ·ocabularv deíined bv the schema íor
schemas. An XML schema uses ·ocabularv deíined bv \3( XML Schema
\orking Group to create a collection oí tvpe deíinitions and element declarations
that declare a shared ·ocabularv íor describing the contents and structure oí a new
class oí XML documents.
OracIe Database 11g XML DB TechnicaI Overview Page 15

XML Schema Base Set of Data Types Can be Extended
1he XML Schema language pro·ides strong tvping oí elements and attributes. It
deíines numerous scalar data tvpes. 1his base set oí data tvpes can be extended to
deíine more complex tvpes. using object-oriented techniques such as inheritance
and extension. 1he XML Schema ·ocabularv also includes constructs that vou can
use to deíine complex tvpes. substitution groups. repeating sets. nesting. ordering.
and so on. Oracle XML DB supports all oí the constructs deíined bv the XML
Schema Recommendation. except íor redeíines.
XML schemas are commonlv used as a mechanism íor checking ·alidating,
whether XML instance documents coníorm with their speciíications. Oracle
XML DB includes XML1vpe methods and SOL íunctions that vou can use to
·alidate XML documents against an XML schema.
XML Schema Unifies Document ModeIing and Data ModeIing
In Oracle XML DB. vou can use XML Schema to automaticallv create database
tables and data tvpes íor storing XML data. 1his allows vou to use a standard data
model íor all oí vour data. whether the data is structured. unstructured. or semi-
structured.
Create XMLType TabIes and CoIumns, Ensure DOM FideIity
\ou can create XML schema-based XML1vpe tables and columns and optionallv
speciív that thev coníorm to pre-registered XML schemas. maintaining DOM
íidelitv.
Schema EvoIution
A major challenge íor de·elopers using an XML schema with Oracle XML DB is
how to deal with changes in the content or structure oí XML documents. In some
en·ironments. the need íor changes mav be írequent or extensi·e. arising írom new
regulations. internal needs. or external opportunities. lor example. new elements or
attributes mav need to be added to an XML schema deíinition. a data tvpe mav
need to be modiíied. or certain minimum and maximum occurrence requirements
mav need to be relaxed or tightened.
In such cases. vou need to "e·ol·e" the XML schema so that new requirements are
accommodated. while anv existing instance documents the data, remain ·alid or
can be made ·alid,. and existing applications can continue to run.
Ií vou do not care about anv existing documents. vou can oí course simplv drop the
XML1vpe tables that are dependent on the XML schema. delete the old XML
schema. and register the new XML schema at the same URL. In most cases.
howe·er. vou need to keep the existing documents. possiblv transíorming them to
accomodate the new XML schema.
OracIe Database 11g XML DB TechnicaI Overview Page 16

Oracle XML DB supports two kinds oí schema e·olution. Lach approach has its
own PL´SOL procedure: DBMS_XMLS(lLMA.copvL·ol·e íor copv-based
e·olution and DBMS_XMLS(lLMA.inPlaceL·ol·e íor in-place e·olution.
In-place Schema Evolution
In-place XML schema e·olution makes changes to an XML schema without
requiring that existing data be copied. deleted. and reinserted. In-place e·olution is
thus much íaster than copv-based e·olution. In general. in-place e·olution is
permitted ií vou are not changing the storage model and ií the changes do not
in·alidate existing documents that is. ií existing documents are coníormant with
the new schema or can be made coníormant with it,.
Copy-based Schema Evolution
\ith copv-base schema e·olution. all instance documents that coníorm to the
schema are copied to a temporarv location in the database. the old schema is
deleted. the modiíied schema is registered. and the instance documents are inserted
into their new locations írom the temporarv area. Although it does not ha·e the
same restrictions as does the in-place schema e·olution. copv-based schema
e·olution can be time-consuming ií there are a large number oí associated instance
documents.
Using XQuery to Query, Transform, and Access XML and ReIationaI
Data
XOuerv 1.0 is the \3( standard language designed íor querving. transíorming. and
accessing XML and relational data. It is similar to SOL in manv wavs. but just as
SOL is designed íor querving structured. relational data. XOuerv is designed
especiallv íor querving semistructured. XML data írom a ·arietv oí data sources.
\ou can use XOuerv to querv XML data where·er it is íound. whether it is stored
in database tables. a·ailable through \eb Ser·ices. or otherwise created on the ílv.
In addition to querving XML data. XOuerv can be used to construct XML data. In
this regard. XOuerv can ser·e as an alternati·e or a complement to both XSL1 and
the other SOL´XML publishing íunctions. such as XMLLlement.
XOuerv builds on the Post-Schema-Validation Iníoset PSVI, data model. which
unites the XML Iníormation Set Iníoset, data model and the XML Schema tvpe
svstem. XOuerv deíines a new data model based on sequences: the result oí each
XOuerv expression is a sequence. XOuerv is all about manipulating sequences. 1his
makes XOuerv similar to a set-manipulation language. except that sequences are
ordered and can contain duplicate items. XOuerv sequences diííer írom the
sequences in some other languages in that nested XOuerv sequences are alwavs
ílattened in their eííect.
In manv cases. sequences can be treated as unordered. to maximize optimization -
where this is a·ailable. it is under vour control. 1his unordered mode can be
applied to join order in the treatment oí nested iterations íor,. and it can be applied
OracIe XML DB supports two kinds of
schema evoIution.
XQuery 1.0 is the W3C standard Ianguage
designed for querying, transforming, and
accessing XML and reIationaI data.
OracIe Database 11g XML DB TechnicaI Overview Page 17

to the treatment oí XPath expressions íor example. in ´a´b. the matching b
elements can be processed without regard to document order,.
An XOuerv sequence consists oí zero or more items. which can be either atomic
scalar, ·alues or XML nodes. Items are tvped using a rich tvpe svstem that is based
upon the tvpes oí XML Schema. 1his tvpe svstem is a major change írom that oí
XPath 1.0. which is limited to simple scalar tvpes such as Boolean. number. and
string.
XOuerv is a íunctional language. As such. it consists oí a set oí possible
expressions that are e·aluated and return ·alues which. in the case oí XOuerv. are
sequences,. As a íunctional language. XOuerv is also reíerentiallv transparent.
generallv: the same expression e·aluated in the same context returns the same
·alue.
Lxceptions to this desirable mathematical propertv include the íollowing:
• XOuerv expressions that deri·e their ·alue írom interaction with the external
en·ironment. lor example. an expression such as ín:current-time..., or
ín:doc..., does not necessarilv alwavs return the same ·alue. since it depends
on external conditions that can change the time changes: the content oí the
target document might change,.
In some cases. like that oí ín:doc. XOuerv is deíined to be reíerentiallv
transparent within the execution oí a single querv: within a querv. each
in·ocation oí ín:doc with the same argument results in the same document.
• XOuerv expressions that are deíined to be dependent on the particular XOuerv
language implementation. 1he result oí e·aluating such expressions might ·arv
between implementations. lunction ín:doc is an example oí a íunction that is
essentiallv implementation-deíined.
Reíerential transparencv applies also to XOuerv ·ariables: the same ·ariable in the
same context has the same ·alue. lunctional languages are like mathematics
íormalisms in this respect and unlike procedural. or imperati·e. programming
languages. A ·ariable in a procedural language is reallv a name íor a memorv
location: it has a current ·alue. or state. as represented bv its content at anv time. A
·ariable in a declarati·e language such as XOuerv is reallv a name íor a static ·alue.
FLWOR Expressions
lL\OR is the most general expression svntax in XOuerv. lL\OR pronounced
"ílower", stands íor íor. let. where. order bv. and return. A lL\OR expression has
at least one íor or let clause and a return clause: single where and order bv clauses
are optional.
• íor - Bind one or more ·ariables each to anv number oí ·alues. in turn. 1hat is.
íor each ·ariable. iterate. binding the ·ariable to a diííerent ·alue íor each
iteration.
OracIe Database 11g XML DB TechnicaI Overview Page 18

At each iteration. the ·ariables are bound in the order thev appear. so that the
·alue oí a ·ariable >earlier that is listed beíore a ·ariable >later in the íor list.
can be used in the binding oí ·ariable >later. lor example. during its second
iteration. this expression binds >i to 4 and >j to 6 2-4,:
íor >i in 3. 4,. >j in >i. 2->i,

• let - Bind one or more ·ariables.
Just as with íor. a ·ariable can be bound bv let to a ·alue computed using
another ·ariable that is listed pre·iouslv in the binding list oí the let or an
enclosing íor or let,. lor example. this expression binds >j to 5 3-2,:
let >i :~ 3. >j :~ >i - 2

• where - lilter the íor and let ·ariable bindings according to some condition.
1his is similar to a SOL \lLRL clause.
• order bv - Sort the result oí where íiltering.
• return - (onstruct a result írom the ordered. íiltered ·alues. 1his is the result
oí the lL\OR expression as a whole. It is a ílattened sequence.
Lxpressions íor and let íunction similarlv to a SOL lROM clause: where acts like a
SOL \lLRL clause: order bv is similar to ORDLR B\ in SOL: and return is like
SLLL(1 in SOL. In other words. except íor the two kevwords whose names are
the same in both languages where. order bv,. lL\OR clause order is more or less
opposite to the SOL clause order. but the meanings oí the corresponding clauses
are quite similar.
Note that using a lL\OR expression with order bv, is the onlv wav to construct a
sequence in anv order other than document order.
SQL/XML XQuery Functions
Oracle XML DB supports SOL´XML 2006 standard XMLOuerv. XML1able. and
XMLLxists íunctions íor passing XOuerv expressions into SOL statements.
• XMLOuerv - used in the SOL SLLL(1 clause íor generating XML írom
queries.
• XML1able - used in the SOL lROM clause íor mapping XML data into a
relational table íormat.
• XMLLxists - used in the SOL \lLRL clause íor processing a querv
based on criteria speciíied in XOuerv expression.
Rewrite for XQuery
Oracle`s querv rewrite technologv íor XOuerv expressions in SOL´XML íunctions
brings high períormance and scalabilitv to XML applications. SOL´XML íunctions
and their corresponding XML1vpe methods use XOuerv expressions to search
collections oí XML documents and to access a subset oí the nodes contained
OracIe's query rewrite technoIogy for
XQuery expressions in SQL/XML functions
brings high performance and scaIabiIity to
XML appIications.
OracIe Database 11g XML DB TechnicaI Overview Page 19

within an XML document. In manv cases. Oracle XML DB is able to rewrite such
expressions to code that executes directlv against the underlving database objects.
Oracle XML DB pro·ides the íollowing wavs oí e·aluating XOuerv expressions
that operate on XML1vpe columns and tables. depending on the XML storage
method used:
• Structured storage - Oracle XML DB attempts to translate the XOuerv
expression in a SOL´XML íunction into an equi·alent SOL querv. 1he SOL
querv reíerences the object-relational data structures that underpin a schema-
based XML1vpe. 1his process is reíerred to as XOuerv rewrite. It can occur
when períorming queries and UPDA1L operations. In addition. B-tree
indexes. íull-text indexes. and íunction-based indexes on the underlving object-
relational tables. can be used to e·aluate XOuerv expressions íor structured
storage.
• Binarv XML storage - Oracle XML DB can e·aluate XPath expressions in
diííerent wavs: using a íunction-based index. using XMLIndex. and using
single-pass streaming. Single-pass streaming means e·aluating a set oí XPath
expressions in a single scan oí binarv XML data. During querv compilation. the
cost-based optimizer picks the íastest combination oí the methods. A
secondarv íull-text index can also be created on the VALUL column oí the
XMLIndex path table to allow optimal íull-text querv execution oí XOuerv
ora:contains íunction.
• Unstructured storage - XMLIndex. and íunction-based indexes can be used to
e·aluate XPath expressions íor unstructured storage. In addition:
In the absence oí an XMLIndex index. Oracle XML DB e·aluates the
XPath expression using íunctional e·aluation. lunctional e·aluation
builds a DOM tree íor each XML document. and then resol·es the
XPath programmaticallv using the methods pro·ided bv the DOM
API. Ií the operation in·ol·es updating the DOM tree. the entire
XML document must be written back to disk when the operation is
completed.
Ií an XMLIndex can be used. then it is used instead oí íunctional
e·aluation. lurther. ií a secondarv íull-text index is present on the
VALUL column oí the XMLIndex path table. it will be used íor
optimal íull-text querv execution oí XOuerv ora:contains íunction.
SQL/XML DuaIity
A major objecti·e in designing Oracle XML DB is to pro·ide XML´SOL dualitv.
XML programmers can le·erage the power oí the relational model when working
with XML content and SOL programmers can le·erage the ílexibilitv oí XML
when working with relational content. 1his lets vou use the most appropriate tools
íor a particular business problem.
A major objective in designing OracIe
XML DB is to provide XML/SQL duaIity.
OracIe Database 11g XML DB TechnicaI Overview Page 20

XML´SOL dualitv means that the same data can be exposed as rows in a table and
manipulated using SOL and XOuerv. or exposed as nodes in an XML document
and manipulated using techniques such as XOuerv rewrite. DOM. and XSL
transíormation. Access and processing techniques are optimized to take ad·antage
oí the underlving storage íormats and indexes.
1hese íeatures pro·ide simple solutions to common business problems. lor
example:
• \ou can use Oracle XML DB SOL´XML íunctions to generate XML data
directlv írom a SOL querv. \ou can then transíorm the XML data into other
íormats. such as l1ML. using the database-resident XSL1 processor.
• \ou can access XML content. without con·erting between diííerent data
íormats. íor use in SOL queries. on-line analvtical processing OLAP,. and
business-intelligence´data warehousing operations.
• \ou can períorm text. spatial. and multimedia operations on XML content.
SQL Standard SQL/XML Functions
SOL´XML 2006 standard deíines mapping between SOL. XML. and XOuerv
constructs. as well as íunctions íor querving. accessing. and generation oí XML.
Oracle XML DB pro·ides the SOL íunctions deíined in the SOL´XML standard.
1his standard is deíined bv speciíications prepared bv the International (ommittee
íor Iníormation 1echnologv Standards IN(I1S, 1echnical (ommittee l2.
IN(I1S is the main standards bodv íor de·eloping standards íor the svntax and
semantics oí database languages. including SOL.
SOL´XML íunctions íall into two categories:
• lunctions that vou can use to querv and access XML content as part oí normal
SOL operations. XMLOuerv. XML1able. and XMLLxists íunctions belong to
this categorv.
• lunctions that vou can use to generate XML data írom the result oí a SOL
querv. 1hese include XMLlement. XMLAttributes. XMLAgg. and XMLlorest
íunctions.
\ith SOL´XML íunctions vou can address XML content in anv part oí a SOL
statement. 1hese íunctions use XOuerv or XPath expressions to tra·erse the XML
structure and identiív the nodes on which to operate. 1he abilitv to embed XOuerv
and XPath expressions in SOL statements greatlv simpliíies XML access.
ReIationaI Views from XML Data and XML Views from ReIationaI Data
Supported bv Oracle`s XOuerv write technologv. Oracle XML DB pro·ides
seamless integration oí XML and relational data. Oracle`s implementation oí
SOL´XML enables high períormance XML publishing and enables XOuerv to
OracIe XML DB provides the SQL
functions defined in the SQL/XML
standard.
OracIe Database 11g XML DB TechnicaI Overview Page 21

operate directlv on relational data. (on·erselv. relational ·iews oí XML content
also allow SOL operations to be períormed eííicientlv on XML.
Use XML Views to Wrap Relational Data
\ou can choose to wrap existing relational and object-relational data into XML
íormat using XML1vpe ·iews. XML1vpe ·iews can be created bv using SOL´XML
XMLOuerv or XML generation íunctions e.g.. XMLAgg. XMLlorest,. Using SOL
XMLOuerv íunction with XOuerv ora:·iew íunction pro·ides ílexible means íor
publishing relational data into complex-structured XML.
Map XML Data to Relational Views
\hile XML data has become pre·alent. there are a large number oí existing
relational database applications that cannot process XML data. Oracle XML DB
pro·ides eííicient support oí SOL´XML XML1able íunction and its (OLUMNS
clause íor mapping XML data into relational ·iews. Bv taking ad·antage oí XOuerv
rewrite technologv. storage models. and indexing schemes. downstream processing
on a relational ·iew created with XML1able íunction can approach pure-relational
períormance.
XMLType Update, Transformation, and Diff/Patch Operations
Oracle XML DB pro·ides comprehensi·e and eííicient support íor all aspects oí
XML processing. In addition to storage. indexing. and querving oí XML content.
updating . transíorming. comparing. and patching XML documents are also
essential operations in XML applications.
Update XML Content Stored in OracIe XML DB
Oracle XML DB allows íine-grained update operations on XML content using
either structured or Securelile binarv XML storage models. Update operations can
either replace the entire contents oí a document or parts oí a document. Partial
updates on XML documents is ·erv poweríul. particularlv when vou make small
changes to large documents. as it can signiíicantlv reduce the amount oí network
traííic and disk input-output required to períorm the update.
1here are se·eral SOL íunctions that vou can use to update XML data
incrementallv without replacing the entire surrounding XML document.
• updateXML - Replace XML nodes oí anv kind.
• insert(hildXML - Insert XML element or attribute nodes as children oí a gi·en
element node.
• insertXMLbeíore - Insert XML nodes oí anv kind immediatelv beíore a gi·en
node other than an attribute node,.
• append(hildXML - Insert XML nodes oí anv kind as the last child nodes oí a
gi·en element node.
OracIe Database 11g XML DB TechnicaI Overview Page 22

• deleteXML - Delete XML nodes oí anv kind.
XSL Transformation and OracIe XML DB
1he \3( XSL1 Recommendation deíines an XML language íor speciíving how to
transíorm XML documents írom one íorm to another. 1ransíormation can include
mapping írom one XML schema to another or mapping írom XML to some other
íormat such as l1ML or Xl1ML.
XSL transíormation can be expensi·e in terms oí the amount oí memorv and
processing required. Both the source document and the stvle sheet need to be
parsed and loaded into memorv structures that allow random access to diííerent
parts oí the documents. Most XSL processors use DOM to pro·ide the in-memorv
representation oí both documents. 1he XSL processor then applies the stvle sheet
to the source document. generating a third document.
Oracle XML DB implements a high períormance XSL1 processor that lets XSL
transíormations be períormed inside the database. In this wav. Oracle XML DB
can pro·ide XML-speciíic memorv optimizations that signiíicantlv reduce the
memorv required to períorm the transíormation. It can also eliminate o·erhead
associated with parsing the documents. 1hese optimizations are onlv a·ailable
when the source íor the transíormation is a schema-based XML document.
Oracle XML pro·ides three wavs to in·oke the XSL processor:
• SOL íunction XMLtransíorm
• XML1vpe method transíorm,
• PL´SOL package DBMS_XSLPRO(LSSOR
Oí these diííerent wavs to transíorm XML data. DBMS_XSLPRO(LSSOR has the
best períormance. because the stvle sheet is parsed onlv once.
Lach oí these XML transíormation methods takes as input a source XML
document and an XSL stvle sheet in the íorm oí XML1vpe instances. lor SOL
íunction XMLtransíorm and XML1vpe method transíorm,. the result oí the
transíormation can be an XML document or a non-XML document. such as
l1ML. lowe·er. íor PL´SOL package DBMS_XSLPRO(LSSOR. the result oí the
transíormation is expected to be a ·alid XML document. 1his means that anv
l1ML generated bv a transíormation using package DBMS_XSLPRO(LSSOR
must be Xl1ML. which is both ·alid XML and ·alid l1ML.
Comparing and Patching XML Documents with XMLDiff and XMLPatch
\ou mav need to compare two ·ersions oí XML documents to see what has
changed. It is also oíten necessarv to applv the same changes to a large number oí
XML documents. 1o simpliív these tasks. Oracle XML DB is pro·iding a pair oí
new SOL íunctions - XMLDiíí and XMLPatch.
OracIe XML DB impIements a high
performance XSLT processor that Iets XSL
transformations be performed inside the
database.
OracIe Database 11g XML DB TechnicaI Overview Page 23

• XMLDiíí - this íunction compares the trees that represent the two input XML
documents to determine diííerences.
• XMLPatch - this íunction takes an instance document generated bv XmlDiíí .
and íollows the instructions in the instance document to modiív other XML
documents as speciíied.
FuII-Text Search of XML Data
Oracle supports íull-text search on documents. Ií vour documents are XML. then
vou can use the XML structure oí the document to reíine the íull-text search. lor
example. vou mav want to íind all purchase orders that contain the word "electric"
using íull-text search. Ií the purchase orders are in XML íorm. then vou can restrict
the search bv íinding all purchase orders that contain the word "electric" in a
comment. or bv íinding all purchase orders that contain the word "electric" in a
comment under line items. Ií vour XML documents are oí tvpe XML1vpe. then
vou can project the results oí vour querv using the XML structure oí the document.
lor example. aíter íinding all purchase orders that contain the word "electric" in a
comment. vou mav want to return just the comments. or just the comments that
contain the word "electric".
1here are two wavs to do a search that includes íull-text search and XML structure:
• Include the structure inside the íull-text predicate. using SOL íunction
contains:
... \lLRL containsdoc. 'electric INPA1l
´purchaseOrder´items´item´comment,', · 0 ...
lunction contains is an extension to SOL. and can be used in anv querv. It
requires a (ON1LX1 íull-text index.
• Include the íull-text predicate inside the structure. using the ora:contains XPath
íunction:
... '´purchaseOrder´items´item´comment|ora:containstext,. "electric",·0|' ...
1he ora:contains XPath íunction is an extension to XPath. and can be used in
anv call to existsNode. extract. or extractValue.
OracIe XML DB Repository
As one oí the kev diííerentiator oí Oracle XML DB. the repositorv supports a rich
set oí ser·ices and APIs íor managing XML content.
FoIdering
loldering is the kevstone Oracle XML DB repositorv that supports storing content
in the database in hierarchical structures. as opposed to traditional relational
database structures. loldering lets applications access hierarchicallv indexed content
in the database using the l1P. l11PS,. and \ebDAV protocols as ií the
OracIe supports fuII-text search on
documents. If your documents are XML,
then you can use the XML structure of the
document to refine the fuII-text search.
As one of the key differentiator of OracIe
XML DB, the repository supports a rich set
of services and APIs for managing XML
content.
OracIe Database 11g XML DB TechnicaI Overview Page 24

database content were stored in a íile svstem. Along with íoldering support. Oracle
XML DB repositorv adheres to the íollowing terminologv.
Resource - Anv object or node in the repositorv hierarchv. Resources are
identiíied bv URLs.
Iolder - A resource that can contain other resources. Sometimes called a directorv.
Links - In addition to containing resources. a íolder resource can contain links to
other resources íiles or íolders,. 1hese repositorv links. sometimes called íolder
links. are not to be coníused with document links. which correspond to the links
pro·ided bv the XLink and XInclude standards. and which are also supported bv
Oracle XML DB. Repositorv links are na·igational. íolder-child links among
repositorv resources: document links are arbitrarv links among documents that are
not necessarilv repositorv resources.
Path name - A hierarchical name representing an absolute path to a resource. It is
composed oí a slash ´, representing the repositorv root. íollowed bv zero or more
path components separated bv slashes. A path component cannot be onlv . or ...
but a period ., can otherwise be used in a path component.
Resource name (or link name) - 1he name oí a resource within its parent íolder.
1his is the rightmost path component oí a path name. Resource names must be
unique within their immediatelv containing íolder. and thev are case-sensiti·e.
Resource content - 1he bodv. or data. oí a resource. 1his is what vou get when
vou treat the resource as a íile and ask íor its content. 1his is alwavs oí tvpe
XML1vpe.
XDBBinary element - An XML element that contains binarv data. It is deíined
bv the Oracle XML DB XML schema. XDBBinarv elements are stored in the
repositorv whene·er unstructured binarv data is uploaded into Oracle XML DB.
Access control list (ACL) - A set oí database users that are allowed access to one
or more speciíic resources.
Resource Versioning
Oracle XML DB ·ersioning pro·ides a wav to create and manage diííerent ·ersions
oí a resource in Oracle XML DB. \hen vou update a resource such as a table or
column. Oracle XML DB stores the pre-update contents as a separate resource
·ersion. Oracle XML DB ·ersioning supports the íollowing:
• Version control on a resource. \ou can turn ·ersion control on or oíí íor an
Oracle XML DB Repositorv resource.
• Updating process oí a ·ersion-controlled resource. \hen Oracle XML DB
updates a ·ersion-controlled resource V(R,. it creates a new ·ersion oí the
resource. 1his new ·ersion will not be deleted írom the database when vou
delete the ·ersion-controlled resource.
OracIe XML DB versioning provides a way
to create and manage different versions of
a resource in OracIe XML DB.
OracIe Database 11g XML DB TechnicaI Overview Page 25

• Loading a V(R is similar to loading a resource in Oracle XML DB using the
path name.
• Loading a ·ersion oí the resource. 1o load a ·ersion oí a resource. vou must
íirst íind the resource object id oí the ·ersion and then load the ·ersion using
that id. 1he resource object id can be íound írom the resource ·ersion historv
or írom the ·ersion-controlled resource itselí.
Repository Resource Security
Obiect-level security is maintained Ior all resources stored in Oracle XML DB
Repositorv. Oracle XML DB uses a securitv mechanism that is based on access
control lists A(Ls, to restrict access to anv Oracle XML DB resource. An A(L is
a list oí access control entries A(Ls, that determine which users. roles. and groups
ha·e access to a gi·en resource.
A(Ls are a standard securitv mechanism that is used in some languages. such as
Ja·a. and some operating svstems. such as Microsoít \indows. A(Ls are also a
part oí the \ebDAV standard. and Oracle XML DB resource A(Ls act as
\ebDAV A(Ls. Resource A(Ls are eníorced no matter how resources are
accessed. whether bv \ebDAV. SOL. or anv other wav.
A(Ls in Oracle XML DB are XML schema-based resources. stored and managed
in Oracle XML DB. Lach resource in Oracle XML DB Repositorv is protect ted bv
an A(L. Beíore a user períorms an operation on a resource. the user pri·ileges on
the resource are checked. 1he set oí pri·ileges checked depends on the operation
to be períormed.
Repository Metadata
Data that vou use is oíten associated with additional iníormation that is not part oí
the content. 1o process it in diííerent wavs. vou can use such metadata to group or
classiív data. lor example. vou might ha·e a collection oí digital photographs. and
vou might associate metadata with each picture. such as iníormation about the
photographic characteristics color composition. íocal length, or context location.
kind oí subject: landscape. people,.
An Oracle XML DB repositorv resource is an XML document that contains both
metadata and data: the data is the contents oí element (ontents: all other elements
in the resource contain metadata. 1he data oí a resource can be XML. but it need
not be.
\ou can associate resources in the Oracle XML DB repositorv with metadata that
vou deíine. In addition to such user-deíined metadata. each repositorv resource also
has associated metadata that Oracle XML DB creates automaticallv and uses
transparentlv, to manage the resource. Such svstem-deíined metadata includes
properties such as the owner and creation date oí each resource.
Lxcept íor svstem-deíined metadata. vou decide which resource iníormation
should be treated as data and which should be treated as metadata. lor a photo
Object-IeveI security is maintained for aII
resources stored in OracIe XML DB
Repository.
OracIe Database 11g XML DB TechnicaI Overview Page 26

resource. supplemental iníormation about the photo is normallv not considered to
be part oí the photo data. which is a binarv image. lor text. howe·er. vou
sometimes ha·e a choice oí whether to include particular iníormation in the
resource contents data, or keep it separate and associate it with the contents as
metadata - that choice is oíten iníluenced bv the applications that use or
produce the data.
User-Defined Resource Metadata
User-deíined resource metadata is itselí represented as XML. It is XML data that is
associated with other XML data. describing it or pro·iding supplementarv. related
iníormation.
User-deíined metadata íor resources can be either XML schema-based or not:
• Resource metadata that is schema-based is stored in separate out-oí-line,
tables. 1hese are related to the resource table bv the resource OID. which is
stored in the hidden object column RLSID oí the metadata tables.
• Resource metadata that is not schema-based is stored in a (LOB column in the
resource table.
\ou can take ad·antage oí schema-based metadata. in particular. to períorm
eííicient queries and DML operations on resources. In this chapter. vou will learn
how to períorm the íollowing tasks in·ol·ing schema-based resource metadata:
• (reate and register an XML schema that deíines the metadata íor a particular
kind oí resource.
• Add metadata to a repositorv resource. and update modiív, such metadata.
• Ouerv resource metadata to íind associated content.
• Delete speciíic metadata associated with a resource and purge all metadata
associated with a resource.
In addition. vou will learn how to add non-schema-based metadata to a resource.
\ou can generallv use user-deíined resource metadata just as vou would use
resource data. In particular. ·ersioning and access-control management applv.
1vpical uses oí resource metadata include workílow applications. eníorcing user
rights management. tracking resource ownership. and controlling resource ·aliditv
dates.
Repository Events
\ou can use Oracle XML DB Repositorv to store and access data oí anv kind in
the íorm oí repositorv resources: íiles and íolders. Repositorv resource operations
include creating. deleting. locking. unlocking. rendering. linking. unlinking. placing
under ·ersion control. checking in. checking out. unchecking out. opening. and
updating. \ou can access data in the repositorv írom anv application. Sometimes
OracIe Database 11g XML DB TechnicaI Overview Page 27

vour application needs to períorm certain actions whene·er a particular repositorv
operation occurs. lor example. vou might want to períorm some mo·e-to-
wastebasket or other backup action whene·er a resource is deleted.
Lach repositorv operation is associated with one or more repositorv e·ents. \our
application can coníigure listeners íor the e·ents associated with resources it is
concerned with. A repositorv e·ent listener is a Ja·a class or a PL´SOL package or
object tvpe. It comprises a set oí PL´SOL procedures or Ja·a methods. each oí
which is called an e·ent handler. Lach e·ent handler processes a single e·ent. A
repositorv e·ent listener can be coníigured íor a particular resource or íor the entire
repositorv. A listener can be íurther restricted to applv onlv when a gi·en node-
existence precondition is met.
XLink and XIncIude
A document-oriented. or content-management. application oíten tracks
relationships. between documents. and those relationships are oíten represented
and manipulated as links oí ·arious kinds. Such links can aííect application
beha·ior in ·arious wavs. including aííecting the document content and the
response to user operations such as mouse clicks.
\3( has two recommendations that are pertinent in this context. íor documents
that are managed in XML repositories:
• XLink - Deíines ·arious tvpes oí links between resources. 1hese links can
model arbitrarv relationships between documents. 1hose documents can reside
inside or outside the repositorv.
• XInclude - Deíines wavs to include the content oí multiple XML documents
or íragments in a single iníoset. 1his pro·ides íor compound documents.
which model inclusion relationships. (ompound documents are documents
that contain other documents: more preciselv. thev are íile resources that
include documents or document íragments. 1he included objects can be íile
resources in the same repositorv or documents or íragments outside the
repositorv.
Using XLink and XInclude to represent document relationships pro·ides ílexibilitv
íor applications. íacilitates reuse oí component documents. and enables their íine-
grained manipulation access control. ·ersioning. metadata. and so on,. \hereas
using XML data structure an ancestor-descendents hierarchv, to model
relationships requires those relationships to be relati·elv íixed. using XLink and
XInclude to model relationships can easilv allow íor change in those relationships.
XLink and XInclude Links Model Document Relationships
XLink and XInclude links model arbitrarv relationships among documents: the
semantics oí a relationship is determined bv the applications that use the link: it is
not inherent in the link itselí. XLink and XInclude links can be mapped to Oracle
XML DB document links. \hen document links target Oracle XML DB
Each repository operation is associated
with one or more repository events. Your
appIication can configure Iisteners for the
events associated with resources it is
concerned with.
OracIe Database 11g XML DB TechnicaI Overview Page 28

Repositorv resources. thev can according to a coníiguration option, be hard or
weak links: in this. thev are similar to repositorv links in that context. Repositorv
links can be na·igated using íile svstem-related protocols such as l1P and l11P:
document links cannot. but thev can be na·igated using the XPath 2.0 íunction
ín:doc.
OracIe XML DB Repository APIs
Oracle XML DB is introducing a new XML DB (ontent (onnector based on the
Ja·a (ontent Repositorv API i.e.. JSR 1¯0,. \ith this support. the standard
content repositorv Ja·a API can be used to access the Oracle XML DB Repositorv.
Both Le·el 1 read-onlv, and Le·el 2 read´write, oí JSR 1¯0 are supported. In
addition. Oracle implementation pro·ides comprehensi·e mapping oí the rich
capabilities oí Oracle XML DB Repositorv to extend this standard API.
J(R models the data in a content repositorv as a tree oí nodes. Lach node mav
ha·e one or more child nodes. L·erv node has exactlv one parent node. except íor
the root node. which has no parent.
In addition to child nodes. a node mav also ha·e one or more properties. A
propertv is a simple name´·alue pair. lor example. a node representing a particular
íile in the content repositorv has a propertv named jcr:created whose ·alue is the
date the íile was created.
Lach propertv has a propertv tvpe. lor example. the jcr:created propertv has the
DA1L propertv tvpe. requiring its ·alue to be a ·alid date´time.
Similarlv. each node has a node tvpe. lor example. a node representing a íile has
node tvpe nt:íile. 1he node tvpe controls what child nodes and properties the node
mav ha·e or must ha·e. lor example. all nodes oí tvpe nt:íile must ha·e a
jcr:created propertv.
liles and íolders in Oracle XML DB Repositorv are represented as J(R nodes and
properties oí those nodes,. 1hev can be created. retrie·ed. and updated using the
J(R APIs.
Internet ProtocoIs Support
Oracle XML DB also pro·ides the Oracle XML DB protocol ser·er. 1his supports
standard Internet protocols. l1P. \ebDAV. and l11PS,. íor accessing its
hierarchical repositorv or íile svstem. l11PS pro·ides secure access to Oracle
XML DB Repositorv.
Session Pooling
Oracle XML DB protocol ser·er maintains a shared pool oí sessions. Lach
protocol connection is associated with one session írom this pool. Aíter a
connection is closed the session is put back into the shared pool and can be used to
ser·e later connections.
OracIe XML DB is introducing a new XML
DB Content Connector based on the Java
Content Repository API (i.e., JSR 170).
OracIe Database 11g XML DB TechnicaI Overview Page 29

Session pooling impro·es períormance oí l11PS, bv a·oiding the cost oí re-
creating session states. especiallv when using l11P 1.0. which creates new
connections íor each request. lor example. a couple oí small íiles can be retrie·ed
bv an existing l11P´1.1 connection in the time necessarv to create a database
session. \ou can tune the number oí sessions in the pool bv setting session-pool-
size in Oracle XML DB xdbconíig.xml íile. or disable it bv setting pool size to zero.
Native OracIe XML DB Web Services
Ser·ice-oriented architecture has become the dominant computing architecture.
and web ser·ices are the backbone oí ser·ice-oriented architecture. \eb ser·ices
pro·ide a standard wav íor applications to exchange iníormation o·er the Internet
and access ser·ices that implement business logic. \our applications can access
Oracle Database using nati·e Oracle XML DB \eb ser·ices. One a·ailable ser·ice
lets vou issue SOL and XOuerv queries and recei·e results as XML data. Another
ser·ice pro·ides access to all PL´SOL stored íunctions and procedures. \ou can
customize the input and output document íormats when vou use the latter ser·ice:
the \SDL is automaticallv generated bv the nati·e database \eb ser·ices engine.
Simple Object Access Protocol SOAP, 1.1 is the ·ersion supported bv Oracle
XML DB. Applications use the l11P POS1 method to submit SOAP requests to
nati·e Oracle XML DB \eb ser·ices. \ou can coníigure the locations oí all nati·e
Oracle XML DB \eb ser·ices and \SDL documents using the Oracle XML DB
coníiguration íile. xdbconíig.xml. \ou can also coníigure securitv settings íor the
\eb ser·ices using the same coníiguration íile.
End-to-End High Performance Programming Langauge APIs for OracIe
XML DB
As a uni·ersal data íormat. XML has been broadlv adopted in manv use cases.
lowe·er. with its ·erbose textual íormat. XML processing can become the critical
path in an application`s computing architecture. 1o pro·ide scalable and high
períormance XML processing. Oracle sol·es this problem bv introducing Binarv
XML Ja·a API íor the mid-tier to address the root cause oí ineííiciencv in
traditional XML processing. lurthermore. Oracle is also introducing the Scalable
DOM API to optimize XML DOM processing bv taking ad·antage oí binarv XML
support along with sophisticated resource optimization schemes. such as data
sharing. shadow copv. and lazv materialization.
ORACLE XML DB APPLICATION DEVELOPMENT TOOLS
Oracle XML DB is supported bv a number oí Oracle and 3
rd
partv tools. SOL
de·elopment íor the database tier can beneíit írom Oracle SOL De·eloper. \eb
ser·ice de·elopment íor ser·ice-oriented architecture will íind Oracle JDe·eloper
to be a ·ersatile tool.
Your appIications can access OracIe
Database using native OracIe XML DB Web
services.
OracIe Database 11g XML DB TechnicaI Overview Page 30

Using OracIe SQL DeveIoper for Database-Tier DeveIopment
Oracle SOL De·eloper is a íree agile de·elopment tool íor the de·elopment oí the
database-tier oí XML applications. \ith SOL De·eloper. vou can browse database
objects. run SOL statements and SOL scripts. and edit and debug PL´SOL
statements. \ou can also run anv number oí pro·ided reports. as well as create and
sa·e vour own. SOL De·eloper enhances producti·itv and simpliíies vour database
de·elopment tasks.
Using OracIe JDeveIoper for SOA AppIication DeveIopment
Oracle JDe·eloper is a comprehensi·e de·elopment tool íor XML applications.
(lient-ser·er. N-tier. and SOA application architectures can be con·enientlv
de·eloped and deploved bv using Oracle JDe·eloper. It is a íree integrated
de·elopment en·ironment with end-to-end support íor modeling. de·eloping.
debugging. optimizing. and deploving Ja·a and XML applications. and \eb
ser·ices.
ORACLE XML DB LIFE CYCLE MANAGEMENT TOOLS
Oracle XML DB pro·ides a complete suite oí tools íor managing the liíe cvcle oí
XML applications. 1he íollowing sections describe the some oí the essential tools
íor managing Oracle XML DB.
SQL*Loader Support
SOLLoader supports loading XML1vpe tables. \ou can load XML1vpe data with
SOLLoader using either the con·entional method or the direct-path method.
regardless oí how it is stored structured. unstructured. or binarv XML storage,.
Export/Import Support
Oracle XML DB supports export and import oí XML1vpe tables and columns that
store XML data. \ou can export and import this data regardless oí the XML1vpe
storage íormat structured. unstructured. or binarv XML,. lowe·er. Data Pump
exports and imports XML data as text or binarv XML data onlv. 1he underlving
object-relational tables and columns used íor structured storage oí XML1vpe are
thus not exported. Instead. thev are con·erted to binarv íorm and then exported as
selí-describing binarv XML data. XML1vpe data stored as (LOB instances
unstructured storage, is exported as text.
Exporting and Importing TransportabIe TabIespaces
Using the transportable tablespace íeature. vou can mo·e a set oí tablespaces írom
one Oracle database to another. whether it is XML schema-based or non-schema-
based. \hen vou export using transportable tablespaces mode. onlv the metadata
íor tables and their dependent objects, within a speciíied set oí tablespaces are
unloaded. \ou can then copv the tablespace data íiles to another Oracle database
and períorm a transport tablespace import. 1his is generallv ·erv íast. because it
in·ol·es onlv copving the tablespace and re-creating the tablespace metadata.
OracIe Database 11g XML DB TechnicaI Overview Page 31

Support for XMLType by OracIe Streams and LogicaI Standby
Oracle Streams and logical standbv now support XML1vpe stored as (LOB. Both
XML schema-based and non-schema-based XML data are supported. Streams can
capture. propagate. and applv changes to XML1vpe data. (apture processes can
capture changes to XML1vpe columns stored as (LOB columns. but capture
processes cannot capture changes to XML1vpe columns stored object relationallv
or as binarv XML. Applv processes can applv changes to XML1vpe columns stored
as (LOB columns. stored object relationallv. or stored as binarv XML.
OracIe Enterprise Manager Support
As an integral component oí an Oracle Database. XML application built with
Oracle XML DB can be managed bv DBAs with the Oracle Lnterprise Manager
tool. Oracle Lnterprise Manager can now be used to manage the íollowing Oracle
XML DB íeatures:
• coníiguration parameters
• repositorv resources
• repositorv access control lists A(Ls,
• XML Schemas
• XML1vpe tables and columns
CONCLUSION
\ith rapidlv multiplving ·olumes and usage scenarios oí XML data. vou can no
longer store and retrie·e XML data in a íile svstem or simplv as LOBs in a
database. Processing XML data in the mid-tier bv building DOM trees has painíullv
met its limits. 1o build scalable web applications with XML. vour database tier has
to reduce the workload oí vour middle tier bv processing XML data more
intelligentlv and eííicientlv. Oracle XML DB meets this acute need oí the
iníormation technologv industrv bv oííering a ·ersatile arrav oí capabilities.
Built on the solid íoundation oí Oracle database. Oracle XML DB pro·ides highlv
extensi·e capabilities íor the eííicient storage. retrie·al. querving. generation. and
management oí massi·e ·olume oí XML data. lurther deepen its integration oí
XML1vpe. XML Schema processing. structured. binarv. and unstructured storage.
XML indexing. XOuerv. content repositorv. SOL´XML. and management
capabilities. XML DB continues to e·ol·e in manv kev areas. In the new Oracle
Database 11g. Oracle XML DB is íorging ahead with a ·ersatile and eííicient binarv
XML storage model. poweríul XML indexes. a high períormance in-place schema
e·olution support. a ·astlv impro·ed implementation oí \3( XOuerv 1.0 standard.
a database-nati·e web ser·ices. a standards-based XLink and XInclude, support
íor compound documents. and more.
XML DB in OracIe Database 11g provides
the most comprehensive and efficient
capabiIities for deveIoping, depIoying, and
managing highIy scaIabIe and versatiIe
XML appIications.

OracIe Database 11g XML DB TechnicaI Overview Page 32

In short. XML DB in Oracle Database 11g pro·ides the most comprehensi·e and
eííicient capabilities íor de·eloping. deploving. and managing highlv scalable and
·ersatile XML applications


OracIe Database 11g XML DB TechnicaI Overview
JuIy 2007
Author: Geoff Lee
Contributing Authors: OracIe XML DB DeveIopment Team

OracIe Corporation
WorId Headquarters
500 OracIe Parkway
Redwood Shores, CA 94065
U.S.A.

WorIdwide Inquiries:
Phone: +1.650.506.7000
Fax: +1.650.506.7200
oracIe.com

Copyright © 2007, OracIe. AII rights reserved.
This document is provided for information purposes onIy and the
contents hereof are subject to change without notice.
This document is not warranted to be error-free, nor subject to any
other warranties or conditions, whether expressed oraIIy or impIied
in Iaw, incIuding impIied warranties and conditions of merchantabiIity
or fitness for a particuIar purpose. We specificaIIy discIaim any
IiabiIity with respect to this document and no contractuaI obIigations
are formed either directIy or indirectIy by this document. This document
may not be reproduced or transmitted in any form or by any means,
eIectronic or mechanicaI, for any purpose, without our prior written permission.
OracIe is a registered trademark of OracIe Corporation and/or its affiIiates.
Other names may be trademarks of their respective owners.