On Wed, Feb 26, 2020 at 11:56 AM James K. Lowden
<jklow...@schemamania.org> wrote:
> > and I want to avoid storing repetitive data, so that the database
> > should contain
> > [...]
> > only the earliest time with the unchanging value is stored.
>
> Be careful what you wish for.  Usually "avoid storing" is a proxy for
> some kind of intended use.  Unless it's infeasible, it's usually better
> to store everything, verbatim, as it arrives.  Then you can present it
> however you like, with nothing lost.

A lot of process measurement instrumentation returns some nominal
values, for instance firmware version. Do we store it or not? Storing
it every second is silly, but if we drop it, we wouldn't be able to
for instance audit if the statistics changed in some subtle way
because of a firmware bug. This 'store only changed values' is
intended for situations like that.
Another suitable candidate for that treatment might be a status, for
instance 'on battery' value for a UPS monitoring system. I can't think
of a scenario where storing it every time would be better.
The only disadvantage I can think of would be incidental, like
monitoring the monitoring system itself: a long period of 'no data'
could be caused by a monitoring failure as well as by the value not
changing; but if that is a concern, I think it would be better to
store a single heartbeat rather than possibly multiple unchanging
values.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to