title: How do I represent a Tree Structure in a mySQL table
body: <p>The tree has the following characteristics:</p>
  
  <ol>
  <li>Each node can have multiple parents and multiple children.</li>
  <li>The Parent nodes of a Node can have different depth.</li>
  </ol>
  
  <p><strong>Example</strong></p>
  
  <p>I am trying to represent a category structure such as the following:</p>
  
  <p><strong>Desktop and Mobile Applications</strong> </p>
  
  <p>Desktop and Mobile Applications->Android Apps </p>
  
  <p>Desktop and Mobile Applications->Android Apps->Games </p>
  
  <p>Desktop and Mobile Applications->Android Apps->Games->Action</p>
  
  <p>Desktop and Mobile Applications->Games</p>
  
  <p>Desktop and Mobile Applications->Games->Action </p>
  
  <p>Desktop and Mobile Applications->Games->Adventure </p>
  
  <p><strong>Desktop Applications</strong></p>
  
  <p>Desktop Applications->Games</p>
  
  <p>Desktop Applications->Games->Action</p>
  
  <p>Desktop Applications->Games->Adventure</p>
  
  <p><strong>IPhone Applications</strong></p>
  
  <p>Desktop Applications->Games</p>
  
  <p>Desktop Applications->Games->Action</p>
  
  <p>Desktop Applications->Games->Adventure</p>
  
  <p>Tried using the Nested Set Algorithm and I end up with multiple "Games" categories with different categoryIDs and at different depths.</p>
  
  <p>Any help with this will be much appreciated.</p>