title: Transforming One to Many to rows
body: <p>I have the following table structures:</p>
  
  <p><strong>Users</strong></p>
  
  <pre><code>| id | name 
  |----|------
  | 1  | Pete 
  | 2  | Jeff
  | 3  | Bob
  </code></pre>
  
  <p><strong>Properties</strong></p>
  
  <pre><code>| user_id | key    | value
  |---------|--------|------
  | 1       | Age    | 24
  | 1       | Gender | M
  | 1       | City   | New York
  | 2       | Age    | 26
  | 2       | Gender | M
  | 3       | Age    | 30
  | 3       | Eyes   | Blue
  </code></pre>
  
  <p>Now I need to 'group' these values into a (mysql) table so that I later can filter / sort / ...</p>
  
  <p><strong>Expected Result</strong></p>
  
  <pre><code>| Name | Age | Gender  | City     | Eyes
  |------|-----|---------|----------|-------
  | Pete | 24  | M       | New York |
  | Jeff | 26  | M       |          |
  | Bob  | 30  |         |          | Blue
  </code></pre>
  
  <p>The reason why it is stored this way, is that each user can define it's 'own' properties.</p>
  
  <p>Currently I am creating / filtering / sorting this table in code, however I am wondering if this can be done with mysql - using mysql to filter / sort this last table would be very handy indeed.</p>
  
  <p>Note however that the number of rows are pretty substantial (hundred thousands to millions).</p>
  
  <p>My concrete question(s) would be the following:</p>
  
  <ul>
  <li>Are there any tools that mysql brings to ease these kind of tasks ? (Temporary tables perhaps ? How does that perform with large datasets)</li>
  <li>Are there other databases that make such operations more trivial (NoSql types like Elastic Search?)</li>
  </ul>
  
  <p>I am looking for general tips/advice, guidelines or possible alternatives to solve this kind of data 'grouping'.</p>