title: CASCADE INSERT from Table A if key doesn't exist on Table B
body: <p>So I have two tables which look like this:</p>
  
  <pre><code>products_tbl (product_id, product_manufacturer, product_name)
  manufacturers_tbl (manufacturer_id, manufacturer_name)
  </code></pre>
  
  <p>Now in case a product_manufacturer is inserted into products_tbl which does NOT yet exist in manufacturers_tbl, I would like to automatically insert the respective key into manufacturers_tbl.</p>
  
  <p>I already found quite a lot of old posts on the general topic of "cascading" inserts, but none of them wanted to integrate such logic.
  Is it possible with mysql only, or would I have to write some more backend/php logic to accomplish this?</p>
  
  <p>EDIT: 
  If the above is not possible, I would like to know how to add a FOREIGN KEY CONSTRAINT which throws an error if a product_manufacturer in products_tbl is added which has no equivalent manufacturer_name in manufacturers_tbl.</p>