Re: implode/explode vs serialize/unserialize [message #178314 is a reply to message #178312] |
Thu, 31 May 2012 23:45 |
Scott Johnson
Messages: 196 Registered: January 2012
Karma:
|
Senior Member |
|
|
On 5/30/2012 2:37 PM, Jerry Stuckle wrote:
> On 5/30/2012 4:35 PM, Scott Johnson wrote:
>> On 5/30/2012 9:57 AM, Jerry Stuckle wrote:
> <snip>
>>> Which would violate rdb normalization rules...
>>>
>>
>> Yes I tried that before while experimenting.
>>
>> I got lazy and just create a 'user_data' field to store some form data
>> without creating an actual field for each one.
>>
>> Well it worked just fine and danady until I needed to do a search for a
>> particular value.
>>
>> I then had to pull ALL the data, deserialize and search that data.
>>
>> What a nightmare. But I did learn some new algorithms in the process.
>>
>> I suppose sometimes it is our failures that teach us the best.
>>
>> :)
>> Scotty
>
> Scotty,
>
> Yup, there are reasons for those rules, and good reasons to follow them! :)
>
> That doesn't mean you should always follow every normalization rule
> every time; there are good reasons why you might not (i.e. performance).
>
> But when you do violate the rules, you should have a good reason and be
> aware of the possible consequences. After all, having to later change
> the database and rewrite the programs can be a long, involved process!
>
No doubt brother.
|
|
|