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 10/31/73 11:50

Colin McKinnon wrote:
> Jerry Stuckle wrote:
>
>
>>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?
>>>
>>
>>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.
>>
>
>
> I don't think its OT. It really depends how big the array is and whether you
> need all of it in memory every time you access it. If you only need a
> specific element, I was surprised to find that even for quite small sets of
> values the database was faster.
>
> Build a test rig and try it out for yourself.
>
> HTH
>
> C.

Colin,

Look at the question again. He's asking about the method of storing data in a
database (database structure), not array handling.

--
==================
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

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