title: SQLite will let you place multiple queries in a transaction, but why does it freak when 1 has a fK_relation to the other?
body: <p>I have 2 queries i was wanting to execute.</p>
  
  <pre><code>delete from song where ast_id = 1;
  delete from artist where ast_id = 1;
  </code></pre>
  
  <p>There is a relationship with the 2.  1 has a FK which references the other.</p>
  
  <p>I was thinking that the queries would be executed together, but i was thinking that if executed in proper order, would delete the songs from the artist and then the artists themselves.  THis was not the case.</p>
  
  <p>I ended up solving it by just breaking it into 2 transactions, but is there a way to keep it just 1?</p>
  
  <p>I was doing something along the lines of:</p>
  
  <pre><code>string query("delete from song where ast_id = 1; delete from artist where ast_id = 1;");
  sqlite3_exec(db, query.c_str(),...);
  </code></pre>
  
  <p>Can do you it in 1 transaction such as above/?</p>