title: Comment system design
body: <p>Here is my current comment system design:</p>
  
  <p><img src="https://i.stack.imgur.com/IqbHF.png" alt="enter image description here"></p>
  
  <p>I'm developing it for a website that has lots of areas, blogs, tutorials, manuals etc etc.  As supposed to developing a separate comment table for each (<code>tblBlogComments</code>, <code>tblTutorialComments</code>) etc etc, I'm trying to go for a one structure fits all approach.</p>
  
  <p>This way, I can turn the comment system into a web control, and just drop it on any page that I want comments for.  It means I only have one set of rules, one set of code files to maintain.</p>
  
  <p>The only problem is, is coming up with a 'nice' way to determine which section (blog/tutorial/manual) belongs to.</p>
  
  <p>For example, one solution would be:</p>
  
  <pre><code>tblComment
  -------------
  Section (int)
  SectionIdentifier (int)
  </code></pre>
  
  <p>Where '<code>Section</code>' maps to a unique to each part of the site, EG:</p>
  
  <pre><code>Blog = 1
  Articles = 2
  Tutorials = 3
  ...
  </code></pre>
  
  <p>A <code>SectionIdentifier</code> is some sort of unique ID for that page,  eg:</p>
  
  <pre><code>ViewBlog.aspx?ID=5
  </code></pre>
  
  <p>This would be section 1, identifier 5.  So now, a comment with <code>Section = 1</code>, <code>SectionIdentifier = 5</code> means it's a comment for blog entry number 5.</p>
  
  <p>This works great, but at the cost of maintainability, and a solid structure, as the <code>SectionIdentifier</code> is anonymous and no relationships can be built.</p>
  
  <p>Is this design OK, or is there a better solution (IE some sort of parent table for a comment?)</p>