Hi Chris, James, Shawn, Thanks for the suggestions - I think they are quite relevant. I will modify and update soon.
I kept the page size as 512 without rowid and dropped foreign keys so I could use it to demo SQLite on a low memory SoC ESP8266 (see https://github.com/siara-cc/esp_arduino_sqlite3_lib/). Since this db would be useful for a larger audience, I will keep separate copies. Regards Arun ---- On Thu, 20 Dec 2018 21:13:47 +0530 Chris Locke <sql...@chrisjlocke.co.uk> wrote ---- > > Just because something doesn't have to be calculated, means that it has > to be stored as text. > > Sorry - forgot a 'doesn't'. > Just because something doesn't have to be calculated, doesn't mean that it > has to be stored as text. > > On Thu, Dec 20, 2018 at 3:42 PM Chris Locke <sql...@chrisjlocke.co.uk> > wrote: > > > Just because something doesn't have to be calculated, means that it has to > > be stored as text. > > Its usually recommended to set the column affinity to the type of data > > you're storing. If you're storing a number (and a model number is a > > numeric number) then it should be stored in a numeric field. If your model > > number has punctuation, then yes, a text field is required. > > Its up to the application (although some would also argue the database) to > > validate data input, ie, ensure numeric data was inputted into a numeric > > field. > > > > On Thu, Dec 20, 2018 at 3:31 PM James K. Lowden <jklow...@schemamania.org> > > wrote: > > > >> On Wed, 19 Dec 2018 10:55:11 +0000 > >> Chris Locke <sql...@chrisjlocke.co.uk> wrote: > >> > >> > Fields with '_no' are read as 'number' and so should be a number. > >> > OK, that doesn't always work for 'telephone_no' (they usually start > >> > with a 0 > >> > >> Lots of numbers are labels that aren't meant to be calculated on. Item > >> number, part number, model number, serial number, order number. > >> Anything that needs to be distinguished and isn't worth naming. > >> > >> It's never a good idea to store such numbers as numerical types. > >> There's always a potential loss of information, be it the leading zero > >> or embedded '-' or multiple '.' characters. Unless the "number" is a > >> quantity, for compuational purposes it's text. > >> > >> --jkl > >> > >> _______________________________________________ > >> sqlite-users mailing list > >> sqlite-users@mailinglists.sqlite.org > >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > >> > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users