title: Simple database table design structure
body: <p>I have a situation while database designing, A simple issue but needed a working suggestions</p>
  <p>My database tables:</p>
  <ul>
  <li>TableAees.</li>
  <li>TableBees.</li>
  </ul>
  <ol>
  <li><code>Aees</code> can mapped/contain one or more records of table <code>Bees</code> or also can be without any <code>Bees</code></li>
  <li><code>Aees</code> can also mapped with one or more records of table <code>Aees</code> itself</li>
  </ol>
  <p>Here normal primary key and foreign key relationship/hierarchy won't solve the purpose and also worried that parent/child hierarchy may end up in forming a loop between tables and can give a duplicates records on various joins.</p>
  <p>Need a better table mapping for above mentioned tables(a,b) which will satisfy 1 and 2 points.</p>
  <p>So to avoid such a situation, how the table relationship/hierarchy will be a better approach?</p>
  <p>Database used: SQL Server</p>
  <p>Thanks for sharing your knowledge.</p>