PL/SQL (MOSC)

MOSC Banner

Parsing XML file to insert into set of tables. Trigger or DBMS Job?

edited Nov 2, 2015 10:01AM in PL/SQL (MOSC) 1 commentAnswered

Hello,

I have a table with XMLType field XML_DATA_TABLE.

Something like:

<Document>

  <Priority>5</Priority>

  <State>2</State>

  <Lines>

    <Line>

      <LineName>Line1</LineName>

      <Fields>

        <DocumentField>

        <Name>Field1</Name>

        <Value>3</Value>

        </DocumentField>

        <DocumentField>

        <Name>Field2</Name>

        <Value>Some_Text</Value>

        </DocumentField>

      </Fields>

    </Line>

  </Lines>

</Document>

XML contains an information that should be extracted into a set of connected tables.

For example, Documents, Lines, Fields, etc.

I have to process XML_DATA_TABLE table periodically to get new objects and insert them into appropriate tables. After processing xml the row should be deleted.

I think that a trigger on insert into XML_DATA_TABLE table is not a good idea in this case, because there should be some complicated logic of data extraction. I am going to create new DBMS job for this purpose.

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center