title: Bulk Insert query multiple collections assistance required
body: <p>I am developing an application where i would like to write a log data that has been requested.</p>
  
  <p>Currently i load student data based the student ids i have passed into my procedure.</p>
  
  <p>I then attempt to load sub data for the student based on the request e.g
  Skills, Hobbies, Languages, Grades, etc etc. These are passed in my stored proc as individual collections.</p>
  
  <p>After everything has been loaded for each student I have to log their student id and the corresponding static sub data identifier regarding the sub data e.g Skills has an id of 45, Hobbies has an id of 46 etc etc. The static sub identifier is the same for all students.</p>
  
  <p>The table can have multiple records for that student(based on whats requested and providing it exists) which is fine:</p>
  
  <p><strong>Table Structure</strong>
   test_bulk</p>
  
  <ul>
  <li>Id(PK) </li>
  <li>Student_Id(FK)</li>
  <li>StudentBioId - Can be null</li>
  </ul>
  
  <p>I would like some advice on the code i am trying to write. I am passing in two varrays, one which has the student identifiers and one which has the identifier relating to the sub data that has been requested for that student.</p>
  
  <p>What is the convention for looping through multiple collections and inserting them appropriately?</p>
  
  <p>Currently i can only get one of them to work which is the Student ID:</p>
  
  <pre><code>CREATE OR REPLACE TYPE studentIDs IS VARRAY (256) OF NUMBER;
  CREATE OR REPLACE TYPE studentBio IS VARRAY (256) OF NUMBER;
  
  BEGIN
     FORALL i IN 1..studentIDs.COUNT
        INSERT INTO test_bulk(Id, Student_id, StudentBioId) 
        VALUES  (-1, studentIDS(i), null);
  END;
  </code></pre>
  
  <p>Advice/Examples would be much appreciated.</p>
  
  <p>Kind Regards,</p>