Skyhawk Systems - Simplify data transformations
Products | Download | Buy | About Us
 
Table of Contents Connect XML-2-DB User's Guide mapIdentityRule.htmTable of ContentsinsertionMapRule.htm

5(j). Map Sequence Rule - <map-seq> (only for Oracle)

Connect XML-2-DB supports the use of sequences for Oracle databases. The next value of a specified sequence can be inserted into a database column. The next value of a sequence can also be passed in as a parameter to a procedure. This is done using the map-seq and the sequence-reference-information rule. The format of map-seq rule is as follows

     <!ELEMENT map-seq              EMPTY>
     <!ATTLIST map-seq
          element-name      CDATA #REQUIRED
          seq-reference     CDATA #REQUIRED
          table-reference   CDATA #IMPLIED
          proc-reference    CDATA #IMPLIED
          column-name       CDATA #IMPLIED
          param-name        CDATA #IMPLIED>
	

Suppose that a sequence SALES_ID_SEQ exists in the database and this sequence has to be used to generate a value for the SALE_ID column of the SALES table. The mapping file should have the following rules defined:

     <table-reference-information table-reference="Sales" table-name="SALES"/>

     <sequence-reference-information seq-reference="SalesIdSeq" seq-name="SALES_ID_SEQ"/>
	 
     <map-seq
         element-name="software-sale" 
         seq-reference="SalesIdSeq"
         table-reference="Sales"
         column-name="SALES_ID"/>
	 
Copyright © Skyhawk Systems. All Rights Reserved.
Send comments and questions to support@skyhawksystems.com.
mapIdentityRule.htmTable of ContentsinsertionMapRule.htm