XML Storage and shredding
609545Jun 13 2008 — edited Jul 11 2008Hello.
I've been doing a POC wrt storing and extracting data from an XML document in Oracle. I've found that this is fairly simple using the following method:
1. INSERT into <tab with XMLTYPE column> VALUES XMLTYPE(BFILENAME etc.)
2. Use XMLTABLE to shred the XML, leaving the data for me to insert into a table.
I was set on using this approach, until I found that processing really large XML files (> 100000 records) causes ORA-31186: Document contains too many nodes.
Seeking alternatives, I then found this, courtesy of Sean Dillon, on the AskTom website:
"Lastly, you can store the XMLType column in an object-relational storage
architecture. This means that when you load the XML document, Oracle automatically
shreds the document into objects and relational rows for you, behind the scenes."
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:18017595372392
I'm particularly interested in the last sentence of the paragraph above. Can anyone show me an example of how this might work (i.e. inserting an XML doc automatically shreds it into relational data)?
I'm guessing this involve schema registration? Is there a node limit with this approach?
Thanks,
Ray