On 15 Dec 2018, at 10:15, Frank Millman wrote:
Simon Slavin says ‘Currency amounts should be stored as integers’. Does this apply to sqlite3 specifically, or is that your recommendation for all databases?
It doesn't matter whether a database is involved. Using integers for currency amounts is long established as the only way to do the arithmetic needed for accounting. I'm not sure when I first learned this; it was surely more than 40 years ago. I wish I could cite a reference. You need to count farthings, pennies, centimes, millièmes, or whatever the smallest denomination of the currency is, and arrange appropriate display filtering. In 1972 or so, I learned PL/I, which then had a "STERLING" data type for representing sums as pounds, shillings, and pence. I gather from what a quick web search shows of current IBM documentation that this data type is no longer (advertised as) supported. Best regards, Niall O'Reilly _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users