title: Database Design Question - Categories / Subcategories
body: <p>I have a question for how I would design a few tables in my database. I have a table to track Categories and one for Subcategories:</p>
  
  <pre><code>TABLE Category
      CategoryID INT
      Description NVARCHAR(500)
  
  TABLE Subcategory
      SubcategoryID INT
      CategoryID INT
      Description NVARCHAR(500)
  </code></pre>
  
  <p>A category might be something like Electronics, and its Subcategories might be DVD Players, Televisions, etc.</p>
  
  <p>I have another table that is going to be referencing the Category/Subcategory. Does it need to reference the SubcategoryID?</p>
  
  <pre><code>TABLE Product
      SubcategoryID INT  -- should this be subcategory?
  </code></pre>
  
  <p>Is there a better way to do this or is this the right way? I'm not much of a database design guy. I'm using SQL Server 2008 R2 if that matters.</p>