title: How to avoid insert, delete, update anomaly in MySql
body: <p>I have two tables like this<br>
  <strong>Table1: manager</strong>
  <div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> =======================================
  || Id || MgrName  || department         ||
  =========================================
  || 1  || mgr1     ||human resource      ||
  || 2  || mgr2     ||marketing           ||
  || 3  || mgr3     ||customer management ||
  =========================================</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>Table2: employee</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>====================================
  || empid   || empname || empmanager||
  ====================================
  || 1       || abc     ||  mgr1     ||
  || 2       || xyz     ||  mgr1     ||
  || 3       || def     ||  mgr3     ||
  =====================================</code></pre>
  </div>
  </div>
  </p>
  
  <p>The thing is when I delete <code>mgr1</code> in <code>table1:manager</code>. I also want to update <code>employee</code> table where <code>empmanager</code> is <code>mgr1</code> by <code>null</code>. I don't want to use any <em>trigger</em>.</p>
  
  <p>Please tell me proper way to design database and also to avoid this problem.</p>