Re: implode/explode vs serialize/unserialize [message #178312 is a reply to message #178310] |
Wed, 30 May 2012 21:37 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
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!
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|