Re: Storing parsed XML-elements as blobs [message #174275 is a reply to message #174272] |
Mon, 30 May 2011 14:57 |
Mathieu Maes
Messages: 5 Registered: May 2011
Karma:
|
Junior Member |
|
|
On 30 mei, 14:57, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> On 5/30/2011 2:42 AM, Maccabi wrote:
>
>
>
>
>
>
>
>
>
>> Hello!
>
>> I am looking for an efficient way of storing large amounts of data in
>> mysql, so that it is quick to access and efficient in store. Im using
>> PHP.
>
>> One idea I am playing with, is parsing (deserializing) the elements
>> and saving the DOMElements (in their binary existience) as BLOBS to be
>> retrieved and parsed for different type of contained data when
>> necessary.
>
>> One danger I see is that in this way I am "bound" to a platform. I
>> guess Java or Perl programs on the same platform, or even PHP program
>> on a different platform, will not be able to utilize the data (is this
>> really the case, BTW?).
>
>> The question is: is it really as efficient as I imagine it to be?
>> could the efficiency outweigh the disadvantages?
>
>> The alternative is to store the XML element as a serialized string,
>> deserialize it at retrieve time, and analyzing / extracting /
>> modifying before re-storing as a string.
>
>> Any experience / know-how out there?
>
>> Thanks a lot!
>
>> Michael
>
> Impossible to tell from your description. The best way to save data is
> almost always based on what the data is.
>
> Personally, I don't save DOM elements or XML in MySQL. I save the data..
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================
Hi Michael,
Everything depends on how you want to use the data. Storing XML or
serialized objects in a database may result in certain limitations,
ie. if you want to perform queries on the data.
Serializing may not be a good idea if the data needs to be available
from different platforms.
Kind regards,
Mathew
|
|
|