title: Table design Cassandra
body: <p>I am persisting data from a machine which lets say has different sensors.</p>
  
  <pre><code>CREATE TABLE raw_data (
      device_id uuid,
      time timestamp,
      id uuid,
      unit text,
      value double,
      PRIMARY KEY ((device_id, unit), time)
  )
  </code></pre>
  
  <p>I need to know which sensor was using when the data was sent. I could add an field "sensor_id" and store sensor related data in an other table. Problem about this approach is that i have to store the location of the sensor (A,B,C) which can change. Changing the location in the sensor table would invalidate old data.</p>
  
  <p>I have a feeling that im still thinking to much in the relational way. How would you suggest to solve this?</p>