You are here: Re: Serializing data vs Storing it in a seperate table « PHP Programming Language « IT news, forums, messages
Re: Serializing data vs Storing it in a seperate table

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация