title: craigslist’s / kijiji's schema
body: <p>I'm curious to find out what kind of database schema craigslist and kijiji uses. They have many categories and cities that grow all the time. The levels also get deeper sometimes (sub-categories, and areas/neighborhoods). </p>
  
  <p>The part I don't understand the most is how they manage their categories. What is the database structure behind their setup? They have so many categories and sub-categories, let's say somebody posts an item inside Cars -> Parts &amp; Accessories > Racing Parts</p>
  
  <p>A few days later, people request more sub-categories under "Racing Parts":</p>
  
  <pre><code>* Accessories
  * Auto Racing Parts
  * Fasteners, Fluids &amp; Gaskets
  * Kart Racing Parts
  * Safety Equipment
  * Other
  </code></pre>
  
  <p>So now they have a new level for Racing parts that go like this:</p>
  
  <pre><code>* Motors -&gt; Parts &amp; Accessories &gt; Racing Parts &gt; Accessories
  * Motors -&gt; Parts &amp; Accessories &gt; Racing Parts &gt; Fasteners etc..
  </code></pre>
  
  <p>What happens with the existing listings that have been posted prior to adding the new subcategories? do they get moved to a sub-category table? What happens to the "Racing Parts" table, does it still store listings or does it just point to new tables now? Or maybe that's not how they do things at all. Thanks for your help!</p>
  
  <p>Simon</p>