views:

11

answers:

1

I have a source of data that I get from a webService. I can never know when it'll change and I need to store it in a DB as soon as I get it. What is the best way to make the storage solution adapt to what I put there. I am using mySQL. Would serialization be the key?

+1  A: 

I would store the context in a column using the TEXT data type, and consider MEDIUMTEXT or LONGTEXT if the content is over 4000 characters. MySQL 5.1 has XML functionality to get values out of the XML payload...

Ideally, I'd consume the webservice and populate tables appropriately.

OMG Ponies
In your ideal situation, how would you counter for the fact that it might change without notice? I am bound to use it =/
Phil
@Phil: Change without notice? Then the best you can do is store as text/string... I wonder how one would expect to consistently get anything of value from such a situation, though.
OMG Ponies
It's my situation though.. all I can do is look cheerful and try to make the best of it hehe :)
Phil