Tuesday, November 19, 2013

Oracle XML DB

In a past project I did some extensive work with ORACLE XML DB. There were many "lesson-learned" moments that I think may be valuable to others and I'll share them here in a series of posts. I'll start by going over the product briefly and follow up with some examples in later posts.

What is XML DB? 

It is an extension of Oracle Database that comes with every installation by default. It provides native XML support (storage and retrieval) through a suite of XML functions and procedures. XML schema's can be registered and transformed and data can be manipulated using hybrid SQL and XPATH queries. Essentially, it provides you with all of the ORACLE database technology you are used to with the ability to incorporate the flexibility/transportability of XML. Oracle explains it best:

XML/SQL Duality
A key objective of Oracle XML DB is to provide XML/ SQL duality. This means that the XML programmer can leverage the power of the relational model when working with XML content and the SQL programmer can leverage the flexibility of XML when working with relational content. This provides application developers with maximum flexibility, allowing them to use the most appropriate tools for a particular business problem.  LINK
What are some key benefits? 

Unification!

  • Unification of Data and Content
  • Transparent XML and SQL interoperability
  • Exploiting Database Capabilities
    • Indexing and Search
    • Updates and Transaction Processing
    • Managing Relationships
    • Multiple Views of Data
    • Performance and Scalability
  • Exploiting XML Capabilities
    • Structure Independence
    • Storage Independence
    • Ease of Presentation
    • Ease of Interchange (B2B data exchange)
Faster, faster, faster.
  • All your data and content in one place. No need to have a separate XML repository/processing layer. 
Image From Oracle Documentation link

Integration and Migration.
  • Connect to other databases, files, etc. 
  • Uniform SQL/XML queries over data integrated from multiple sources. 
  • Facilitates migrating non-XML to XML data


 How do we leverage these capabilities? 

This is the best part, it is available with oracle 9.2 and higher. Look for my next post on getting started. I'll go over registering an xml schema, creating xmltype tables, xml queries and text search capabilities, schema evolution, and more.

No comments: