Re:Appropriate Uses for SQLite
by dragonwriter on Monday February 12, 2018 @11:53AM
(#16359885)
You could just store decimal strings and use application-language decimal functions to operate on them, even in queries, since it's fairly trivial to use application-language functions as SQLite (scalar or aggregate) database functions, at least in most decent SQLite drivers I've seen. It's one of the advantages of an in-process database.
[ Parent
| on HN ]
Re:Appropriate Uses for SQLite
by BareNakedCoder on Tuesday February 13, 2018 @01:20PM
(#16369376)
Strings don't work well with numeric aggregate SQL functions like SUM or MAX. Also, won't work well with comparisons or sorting: "111.00" is less than "9.99" string-wise (unless you store all numerics with a bunch of leading "0"; but then that takes a lot more space).
Re:Appropriate Uses for SQLite
by fauigerzigerk on Monday February 12, 2018 @01:05PM
(#16360475)
Interesting. I'll look into it next time it comes up. I wonder how it interacts with indexes and how it affects performance generally.