title: database structure for category and sub category
body: <p>I am bit confusion What can be best solution for category database structure. Here, I have the following cateogry list.</p>
  
  <ol>
  <li><p>News</p>
  
  <p>1.1 General News</p>
  
  <p>1.2 Entertaintment News</p>
  
  <p>1.3 Sports News</p></li>
  <li><p>Horoscope</p>
  
  <p>2.1 Daily Horoscope</p>
  
  <pre><code>  2.1.1 Aries
  
    2.1.2 Taurus
  
    2.1.3 Gemini
  
     .....
  
    2.1.12 Pisces
  </code></pre>
  
  <p>2.2 Weekly Horoscope</p>
  
  <pre><code>  2.2.1 Aries
  
    2.2.2 Taurus
  
    2.2.3 Gemini
  
     .....
  
    2.2.12 Pisces
  </code></pre></li>
  <li><p>Jokes</p></li>
  </ol>
  
  <p>This is my present category list. Here, I have to built admin panel where category and sub category can be added. Currently, I have 2 sub-category of Horoscope. In future more sub-category can be added like monthly and yearly Horoscope just for example. Another confusion is that daily and weekly horoscope have same sub-category that means single sub-category have multiple parent category. Here,How can I eliminate the duplication in database table. and I need to display category in tree structure using recursive function.
     I google for the solution, I couldn't find the appropriate answer. Would you plz provide me answer or links relataed to this. I am coding in php and MS-server database.</p>