Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Storing XML documents in Oracle

Oracle Database Tips by Donald BurlesonMarch 5, 2015

 

Question:  Oracle is offering more than one possibility to save XML into its DB.  Can you explain the different ways that you can store an XML document in Oracle?

Answer:  Oracle has several procedures and techniques for inserting data, either in-line (inside the tablespace) or offline using the BFILE syntax.

Begin
DBMS_XMLSCHEMA.registerSchema(
   schemaURL => 'Mailpiece_Processing/oif_dtypes',
   schemaDoc => bfilename('XML_TEST','oif_dtypes.xsd'));
End;

Create table XML_default auf XMLType

insert into xml_default
values
(
XMLTYPE
(
   Bfilename ('XML_TEST', 'Test.xml'),
   nls_charset_id('AL32UTF8'
));

Also, note that the best benefit of XML-DB is the ability to validate document structure with DTD's, which Oracle has re-named XSD's (XML-DB schema definition):

Rampant author V. J. Jain has a good article on storing XML inside Oracle with XSD definitions.

 


Question:  If I import XML with the BFILE option, is it called CLOB Storage or object relational?

Answer:  I would say "both"!  The main difference between relational and object-relational is the use of pointers (file location address), so the BFILE function is indeed object-oriented. It's also properly called CLOB storage, but remember that CLOB's can also be stored in the tablespace without pointers.

Using the BFILE construct is outside Oracle, and all Oracles does is maintain a "pointer" to the file location where the CLOB resides. Oracle DOES not manage the data itself, in a traditional relational sense.

So, does this non-relational storage make it "object relational"? I would say "Yes".

In a true object-oriented database, the DBMS is nothing more that a persistence method for allowing object permanence. It's more like a C++ language extension than a DBMS.

What is "object oriented Oracle"? It's the incorporation of the OO constructs such as polymorphism, encapsulation and inheritance, but it also include the "create type" ability where you can define non-traditional storage constructs (nested tables, VARRAY columns, capturing OID's that point to rows).

I have written several books on this subject:

If you like Oracle tuning, you might enjoy my book "Oracle Tuning: The Definitive Reference", with 950 pages of tuning tips and scripts. 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.


 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.