title: MYSQL- Create and store primary key in master and child table
body: <p><pre>
  I got stuck while insertion into database tables.
  I have below tables.</pre><br/>
  <img src="https://i.stack.imgur.com/fv20g.png" alt="Table Relations"></p>
  
  <p><br/></p>
  
  <p>I dont have any fields which can be make as Primary key.
  <br/><b>Here "eme_request" and "eme_attachment" is master tables.</b>
  <br/></p>
  
  <p>I want to know that how can I insert into tables ? <br/>
  These tables(eme_request, eme_gf_relevent, eme_non_gf_relevent, eme_attachment) are getting insertion on one form request.</p>
  
  <p><br/>
  So I am not getting how to generate primary key in master table and how to insert into child table with that primary key as a Foreign key ?</p>