Posted by Steve on 05/14/06 21:12
On Sun, 14 May 2006 11:34:05 +0000, Colin McKinnon wrote:
> Alan Little wrote:
>
>> Carved in mystic runes upon the very living rock, the last words of
>> windandwaves of comp.lang.php make plain:
>>
>>> I have to store up to eight boolean bits of information about an item
>>> in my database.
>>>
>>> There are three ways of storing this information in my mysql database
>>> A. add eight fields (tiny integer)
>>> B. add one tiny integer and create a function in PHP that can translate
>>
>> I'd go with B, just my personal preference.
>>
>
> You'd get a mouthful if you tried that working for me.
>
> Its a BAD idea. SQL has no visibility of it. It's not normalized and it
> doesn't scale. In fairness certain types of search can be done very fast,
> but they're unlikely to be particularly common.
>
> C.
....also when the customer decides they want a 9th value stored? Waaay too
inflexible.
I'd use option D
[Back to original message]
|