title: Database design for data acquisition with multiple variable types
body: <p>I'll design and implement database for data acquisition and started to wonder what might be the best relational database structure for multivariable solution. There can be dozens of variables (configurable), different types (boolean, integer, float at least, maybe string). Values of different variables are not related. I need to store variable, new value and timestamp. Storing variables is triggered either by a clock or change of value.</p>
  
  <p>Simplest solution would be one table with variable FK, new value, and timestamp, but since variables can have different types, type of new value causes problem. I can think few possible solutions, all involving separate table for variable definition and one or more table for timeseries, one record for each variable-value-timestamp: </p>
  
  <ol>
  <li>Have some common data type which can store all values (string?)</li>
  <li>Have multiple columns, one for each type</li>
  <li>Have multiple tables for data values, one table for each type</li>
  </ol>
  
  <p>Something else?</p>
  
  <p>Basically I'm looking for good "database design pattern".</p>