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: Export/Import Using Oracle XML

Re: Export/Import Using Oracle XML

From: Leo J. Hart IV <leo.hart_at_fmr.com>
Date: 2 Jul 2003 09:58:21 -0700
Message-ID: <b6bda431.0307020858.4056ad30@posting.google.com>


Thanks Nuno! I'll give that a shot.

wizofoz2k_at_yahoo.com.au (Nuno Souto) wrote in message news:<73e20c6c.0306262145.1b9e0c6f_at_posting.google.com>...
> "Leo J. Hart IV" <leo.hart_at_nospam.fmr.com> wrote in message news:<fqnKa.160$Mn.63_at_news-srv1.fmr.com>...
>
> > So, any suggestions on HOW TO do something like this?
> >
>
> Here is one:
>
> Use an O-R view to define the DOM-tree you want.
> This is done by creating object types for every row
> in the tables involved, then creating collection
> (nested table) data types for each row object involved,
> then creating an Object Relational view (see the OR Manual)
> that creates the "root" row and its attributes, including
> the collection data types of dependent rows.
>
> THEN, you use the XML packages provided by Oracle in the XMLSDK
> to extract the data from the view as a DOM-tree.
> Possibly, in a format similar to this:
>
> <tbl_one primaryKeyCol="id" >
> <name dataType="VARCHAR2(30)">This</name>
> <tbl_two row_number=1 primaryKeyCol="id">
> <name dataType="VARCHAR2(30)">That</name>
> </tbl_two>
> <tbl_two row_number=2 primaryKeyCol="id">
> <name dataType="VARCHAR2(30)">That</name>
> </tbl_two>
> </tbl_one>
>
> To import, you can use the packages to insert
> into the O-R view, but you'll need INSTEAD OF
> triggers to then expand the DOM tree into its
> table elements.
>
> HTH
>
> PS: Hope you're using 9i. If you're using 8i, then
> the DOM-tree via O-R mapping is limited to one level...
> DAMHIKT!
> Cheers
> Nuno Souto
> wizofoz2k_at_yahoo.com.au.nospam
Received on Wed Jul 02 2003 - 11:58:21 CDT

Original text of this message

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