title: about database table design
body: <p>I've done research on the web for a while but couldn't find a same situation. What I need is follow:</p>
  
  <p>I have 20 groups, and each group has its own document template. For example, in group one, the template has 26 contents: A,B,C,D,E.....Z. But not all of these 26 contents will display. </p>
  
  <blockquote>
    <p>For example, document 1 will display 10 contents, and document will display 15 contents. In group two, the template has 30 contents: aa1,bb2,cc3,.....yy30. Each document will display certain contents depending on parameters passed, same as group one. </p>
  </blockquote>
  
  <p>I will create a method with parameters and the documents will be generated based on the parameters passed.</p>
  
  <p>How should I design the database tables in sql server?
  1) Use A,B,C,D....Z as columns, the values will be either true(show) or false(not show)?  But each group has different templates. For example, group two will have columns aa, bb, cc.....So I have to create 20 tables for 20 groups? This is not a good strategy? The records be will like:</p>
  
  <pre><code>             A      B      C
  doc1       true   true   false
  doc2       true   true   false
  </code></pre>
  
  <p>2) Use A,B,C,D...Z as rows, the values will be either true(show) or false(not show)? Then they will be many redundant records. For example, document 1 of group 1 will have:</p>
  
  <pre><code>doc1   A    true
  doc1   B    true
  doc1   C    false
  ...
  doc2
  doc2
  ...
  doc
  </code></pre>
  
  <p>Please help give advice. Thanks!</p>