title: Name value pair table vs parent child
body: <p>I want to store about 100k rows of data, and all data some common field.
  All data have a category and other fields is base on category.</p>
  
  <p>For example if data is in category 1, It had <code>extrafield1</code> and <code>extrafield2</code></p>
  
  <p>I search and found two way for storing data.</p>
  
  <p><strong>1-Name value pair</strong></p>
  
  <pre><code>Table1
  ID    Name     Category   Field2           Field3
  1     Name1    1          Value            Value
  2     Name2    2          Value            Value
  
  Table2 
  ID    Table1_ID         Name           Value
  1     1                 extrafield1    1
  2     1                 extrafield2    2
  3     1                 extrafield3    3
  4     2                 extrafield4    4
  5     2                 extrafield5    5
  </code></pre>
  
  <p><strong>2-Parent Child table</strong></p>
  
  <pre><code>Table1
  ID    Name     Category   Field2           Field3
  1     Name1    1          Value            Value
  2     Name2    2          Value            Value
  
  Tableforcategory1 
  ID    Table1_ID         extrafield1    extrafield2     extrafield3
  1     1                 1              2               3
  
  
  Tableforcategory2 
  ID    Table1_ID         extrafield4    extrafield5
  1     2                 4              5   
  </code></pre>
  
  <p>So my question is when use <strong>method 1</strong> and when use <strong>method 2</strong>.</p>