|
Posted by Jerry Stuckle on 06/13/06 16:05
Kyle Teague wrote:
> What would give better performance, serializing a multidimensional array
> and storing it in a single entry in a table or storing each element of
> the array in a separate table and associating the entries with the entry
> in the other table?
>
> Having a separate table would result in two queries instead of one, but
> you wouldn't have to deal with the overhead of serializing and
> unserializing data.
>
> -- Kyle
That depends. Is the multidimensional array a single entity - or is it a
collection of entities?
Do some research on "database normalization". It's almost never a good idea to
store multiple entities in a single field in a RDB.
BTW you can still do it with one query by joining tables.
One other thing - this isn't a PHP question - you should be asking in a group
related to your database, such as comp.databases.mysql.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|