- Oracle-Developer.com -

 

Navigation: Discussion Forums (Get expert advice)  |  Publications  |  Scripts  |  About Us  | Links
 


Oracle Developer > Scripts > Using Binary XML Storage in Oracle 11g
 

About Binary XML Storage


Oracle XML DB is an extremely useful technology that allows management of XML content in the database.  XML DB offers different storage options to meet your specific situation and requirement.  In previous releases, these options were either unstructured (CLOB) or structured storage (schema-based).  With the introduction of 11g, binary XML storage has been added as an additional storage option.  Binary XML is a format designed specifically for XML data and is compact and schema aware.

Binary XML is a new storage option introduced in 11g that stores the document in a post-parse binary format designed specifically for XML.  This option will likely be the best choice for most XML requirements.  The new binary storage offers insertion performance comparable to unstructured storage and query and disk space performance comparable to structured storage.  Unlike structured storage, the benefits of binary XML are not dependent on schema registration.  However, you have the option of registering a binary XML schema to have schema based binary XML tables.  One limitation is that a registered XML schema cannot be shared between a binary XML and object relational table. 

Create Binary XML Table

CREATE TABLE B_XML_TABLE OF XMLType XMLTYPE STORE AS BINARY XML;

Insert XML Document to Binary XML Table

insert into B_XML_TABLE values (XMLTYPE(BFILENAME ('XML_DIR','document_name.xml'),nls_charset_id('AL32UTF8')));


As soon as the insert is complete, you can begin to access the XML documents using SQL/XML.


Learn More about Oracle XML DB in 11g

Oracle XML DB For Wireless
Managing Complex XML Data in Oracle 11g

Read More about Oracle 11g New Features

For more information about Binary XML Storage, make sure you get a copy of Oracle 11g New Features Guide by John Garmany, Steve Karam, Lutz Hartmann, V. J. Jain, and Brian Carr http://www.oracle-developer.com/oracle_11g_new_features.html
 

 

 

 

Sponsored by Varun Jain, Inc. Oracle Applications and Database Consulting

Copyright ©2007 Oracle-Developer.com