title: How to design a relational database that has data points (a value and a timestamp) for different unique IDs?
body: <p>The database is supposed to contain the information about different virtual machines instances. Each VM has a unique ID, a user, and a "is running" tag. Also, for each ID, there is a list of datapoints for the CPU utilization over the last hour.</p>
  
  <p>I was thinking of creating two tables:</p>
  
  <ol>
  <li><p>Instances(ID, user, isRunning)</p></li>
  <li><p>Datapoints(ID, value, timestamp)</p></li>
  </ol>
  
  <p>The table 2 would look like that:</p>
  
  <pre><code>+-----+-------+-----------+
  | ID  | Value | Timestamp |
  +-----+-------+-----------+
  | ID1 |     . |         . |
  | ID1 |     . |         . |
  | ID1 |     . |         . |
  | ID2 |     . |         . |
  | ID2 |     . |         . |
  | ID2 |     . |         . |
  +-----+-------+-----------+
  </code></pre>
  
  <p>The unique IDs would have to be repeated in the table for the number of datapoints associated with it. I was  wondering if that design would work?</p>