title: MYSQL - Should I use multiple subtables or one subtable for data descriptors?
body: <p>I am creating a table to store data from various government reports. An example row in the table would be:</p>
  
  <p>Values_table</p>
  
  <pre><code>Date           Location     Report       Attribute    Value
  '2014-09-29'   'U.S.'       'LM_HG201'   'Price'      210
  </code></pre>
  
  <p>Obviously I do not want to save strings for all of these columns, so I will be making subtables with ids to use instead. In order to balance table speed and ease of use, would it be better to make multiple subtables like:</p>
  
  <p>Location_table</p>
  
  <pre><code>ID     Location
  1      'U.S' 
  2      'World'
  </code></pre>
  
  <p>Report_table</p>
  
  <pre><code>ID     Report
  1      'LM_HG201'
  </code></pre>
  
  <p>Attribute_table</p>
  
  <pre><code>ID     Attribute
  1      'Price'
  </code></pre>
  
  <p>Where my query of the values table is something like:</p>
  
  <pre><code>SELECT value FROM Values_table 
    WHERE location = (SELECT id FROM locations_table WHERE location = 'U.S') 
    AND attribute = (SELECT id FROM attributes_table WHERE attribute = 'price')
  </code></pre>
  
  <p>Or would it be better to use a single descriptors subtable, like this:</p>
  
  <p>Descriptors_table</p>
  
  <pre><code>ID      Location       Report       Attribute
  1       'U.S.'         'LM_HG201'   'Price'
  </code></pre>
  
  <p>Where my query of the values table would be:</p>
  
  <pre><code>SELECT value FROM values_table
    WHERE descriptor_id IN (SELECT id FROM descriptors_table 
    WHERE location = 'U.S.' AND report = 'LM_HG201' AND attribute = 'Price')
  </code></pre>
  
  <p>In my mind the second approach seems better but I've never seen it done this way. Any thoughts on which is worse/better?</p>