Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: XMLType performance

Re: XMLType performance

From: peteh <phazzard_at_intellicare.com>
Date: 13 Apr 2007 07:27:37 -0700
Message-ID: <1176474457.051629.96680@o5g2000hsb.googlegroups.com>

DA Morgan wrote:
> Please don't top post. Scroll to the bottom to reply.
>
> Consider this:
>
> set serveroutput on
>
> DECLARE
> ctx dbms_xmlgen.ctxHandle;
> xml CLOB;
> emp_no NUMBER := 7369;
> xmlc VARCHAR2(4000); -- Required to convert LOB to VARCHAR2
> off PLS_INTEGER := 1;
> len PLS_INTEGER := 4000;
> BEGIN
> ctx := dbms_xmlgen.newContext('SELECT * FROM emp WHERE empno =
> '|| emp_no);
> dbms_output.put_line(ctx);
>
> xml := dbms_xmlgen.getXML(ctx);
> dbms_output.put_line(xml);
>
> dbms_xmlgen.closeContext(ctx);
>
> dbms_lob.read(xml, len, off, xmlc);
> dbms_output.put_line(xmlc);
> END;
> /
>
> Why would I want to store the XML?
> --

How does this example relate in any meaningful way to the business scenario I provided? How does this illustrate the ability to treat the data WITHIN the xml doc as columns in a table to be SELECTed, UPDATEd, INSERTed or used in a WHERE clause without "hard-wiring" some shredding process to the existing xml document structure? This is some of the value inherent in storing native xml and relational data within the DBMS. You may certainly choose to continue to "never" store xml, but I suspect you will be building more maintenance-intensive solutions for your customers and depriving your students of some potentially valuable modes of thought. My 2 cents only.

Pete H Received on Fri Apr 13 2007 - 09:27:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US