title: What is the best OOP approach to implement the best Category and Products relationship using PHP?
body: <p>I am trying to design a PHP project's structure. What I am not very sure about is how to implement categories and products relationship. A category has one parent, and can have many children. Product belongs to only one category. 
  Db tables are like this:</p>
  
  <p><strong>products:</strong>
  id    product_name   category_id</p>
  
  <p><strong>categories</strong>
  id category_name parent_id</p>
  
  <p>I created a class for products, a class for categories. But I do not know what is the best way to relate them in object oriented manner.</p>
  
  <p>Should I have more classes like CategoryManager, if yes what should it look like ?</p>
  
  <p>Anyone has good approach to implement relations in code level, not in db level.</p>
  
  <p>Thanks in advance.</p>