dimensional and unit analysis in SQL database

后端 未结 3 773
情书的邮戳
情书的邮戳 2021-01-14 01:13

Problem:

A relational database (Postgres) storing timeseries data of various measurement values. Each measurement value can have a specific \"measurement type\" (e.g

3条回答
  •  被撕碎了的回忆
    2021-01-14 01:33

    "Text worries me somewhat because there's the possibility for non-unique duplicates"

    Right. So don't use text as a key. Use the ID as a key.

    "Is there a more elegant way to accomplish this?"

    Not really. It's hard. Temperature is it's own problem because temperature is itself an average, and doesn't sum like distance does; plus F to C conversion is not a multiply (as it is with every other unit conversion.)

提交回复
热议问题