Re:Postgres 15 improves UNIQUE and NULL
by Cthulhu_ on Monday July 11, 2022 @05:55AM
(#32054126)
Wouldn't a meter value that doesn't have distortions just have a value of 0 (that is, not null but just zero); the properties of a meter in this case belong somewhere else, either in a "meter properties" table if you have many meters with many properties that can change, or just hardcoded.
Alternatively, a key / value table, e.g. `meter_id, property, value`. But that isn't very optimal, works better for things like a shop product with many different properties per product.
Re:Postgres 15 improves UNIQUE and NULL
by RedShift1 on Monday July 11, 2022 @06:18AM
(#32054280)
It doesn't mean there are no distortions, it just means they are not measured. So I vastly prefer knowing there's no data than some placeholder that "simulates" no data
Alternatively, a key / value table, e.g. `meter_id, property, value`. But that isn't very optimal, works better for things like a shop product with many different properties per product.