NYCPHP Meetup

NYPHP.org

[nycphp-talk] Database, table, and column naming schemes

Matt Juszczak matt at atopia.net
Sat Sep 19 21:46:13 EDT 2009


> Here you are facing an issue between readability/ease of retrieval and
> space needed to store.  I think that the idea of using a string of 0's
> and 1's in one field is interesting & useful, and is readable enough so
> that if something is awry you'd be able to find it fast.  Some string-
> handling functions to pull out individual values & update the field as
> needed, and you're rolling.
>
> I'd suspect that in a very large database, by using one field of an
> appropriate size to store a string of 40 booleans, rather than 40
> tinyint fields, you could save some really appreciable room.

Cool :) Thanks!  I also think it will save not only space, but vertical 
size too.  A bunch of is_* columns can just get overwhelming.



More information about the talk mailing list