[lug] Which Database schema?
Zan Lynx
zlynx at acm.org
Tue Nov 13 15:22:31 MST 2018
On November 13, 2018 11:44:38 AM MST, Bear Giles <bgiles at coyotesong.com> wrote:
>More columns, and be sure write your SELECT statements so you only pull
>the
>columns you actually need. Sometimes that's everything, sometimes you
>only
>need a few columns but people use "*" by habit and their performance
>suffers.
>
>
>On Tue, Nov 13, 2018 at 8:32 AM BC <bcarr at purgatoire.org> wrote:
>
>>
>> I'm a hobbyist with no formal CS schooling background.
>>
>> With respect to # of columns in a db table, is it better to have
>fewer
>> columns, each being much wider, or more columns with smaller chunks
>of
>> data in them? With more columns, the updates to the db would be to
>> fewer columns at each read/write.
>>
>> I think I know the answer, but would appreciate your thoughts. I can
>> expand the question more if need be.
>>
>> The db I'm using is SQLite but presumably the answer would apply to
>> all db types, right?
>>
>> _______________________________________________
>> Web Page: http://lug.boulder.co.us
>> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>> Join us on IRC: irc.hackingsociety.org port=6667
>channel=#hackingsociety
I recall reading a blog a while ago by a developer who regretted making lots of columns.
Because of things like Chinese names he got rid of first name, last name and simply had name. Instead of street number, street, city, etc., he just had mailing address.
Once he got outside of the US and European countries things just got too weird for his many columns.
More information about the LUG
mailing list