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
2010-09-02 15:49:41
In your ideal situation, how would you counter for the fact that it might change without notice? I am bound to use it =/
Phil
2010-09-03 06:27:18
@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
2010-09-03 15:32:38
It's my situation though.. all I can do is look cheerful and try to make the best of it hehe :)
Phil
2010-09-04 11:42:28