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

Home -> Community -> Usenet -> c.d.o.misc -> Getting XML datagram data into Oracle tables

Getting XML datagram data into Oracle tables

From: rsk <rkopitzke_at_earthlink.net>
Date: Fri, 31 Aug 2001 16:04:24 GMT
Message-ID: <cAOj7.2990$ld2.45936@newsread2.prod.itd.earthlink.net>


I am trying to get the following XML datagram into Oracle 8.1.7 and am wondering what is the best way to this.

I have a book table, an author table and an address table and a book_author associative table. A book can have many authors, an author can have many books and an author can have many addresses.

I initially thought I could use nested tables but that apparently doesn't work because you have multiple levels of nested tables (i.e. can't nest addresses within nested authors).

<book>

    <isbn>...</isbn>
    <title>...</title>
    <author>
        <first_name>....</first_name>
        <last_name>....</last_name>
        <address>

<address_type>...</address_type>
<street_name>...</street_name>
<city_name>...</city_name>
</address> <address>
<address_type>...</address_type>
<street_name>...</street_name>
<city_name>...</city_name>
</address>

    </author>
    <author>
        <first_name>....</first_name>
        <last_name>....</last_name>
        <address>

<address_type>...</address_type>
<street_name>...</street_name>
<city_name>...</city_name>
</address> <address>
<address_type>...</address_type>
<street_name>...</street_name>
<city_name>...</city_name>
</address>

    </author>
</book>

Thanks for any suggestions.

Rick Received on Fri Aug 31 2001 - 11:04:24 CDT

Original text of this message

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