title: Error : Cannot delete or update a parent row: a foreign key constraint fails
body: <p>I have 2 tables: <code>RubricsDocument</code> and <code>Documents</code>. In the <code>RubricsDocument</code>, I have the id of the document (foreign key). My goal is to delete one document but the error</p>
  
  <pre><code>Cannot delete or update a parent row: a foreign key constraint fails
  </code></pre>
  
  <p>appears. I have try to delete rubrics of the document before the document but isn't work. I don't know what i have to do to resolve this error.</p>
  
  <p><a href="http://sqlfiddle.com/#!9/204749" rel="nofollow noreferrer">http://sqlfiddle.com/#!9/204749</a> to see the creation of tables</p>
  
  <pre><code>RubricsDocument Table
  -
  1450    1   1   245 66
  &lt;-- 66 is id of the document    
  1451    2   1   296 66    
  1452    3   1   297 66    
  1453    4   1   298 66    
  1456    7   1   301 66
  </code></pre>