java - JDBC Batch Insert of Nested Records -


i'm wondering if there's accepted pattern performing batch insert of nested records in jdbc. specifically, have xml file contains 3 types: wrapper, a, , b. wrapper ever occurs once in xml file , has one-to-many relationship a. may have guessed, has one-to-many relationship b such example file looks like

<wrapper>   <a>     <b></b>     <b></b>     <b></b>   </a>   <a>     <b></b>     <b></b>     <b></b>   </a>   <a>     <b></b>     <b></b>     <b></b>   </a> </wrapper> 

do first iterate on elements in order perform batch insert of records , iterate again on elements , each b element in order perform subsequent batch insert of b records? or there way can 1 iteration , 1 batch insert necessary?


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -