XML & data type
Posted in 2012
Topics: Data Types & Schema Design
Related to this old discussion: https://groups.google.com/group/comp.databases.informix/browse_thread/thread/67afa567b8d12674/e51b96215e9922c2?hl=it&lnk=gst&q=xml+data+typ3#e51b96215e9922c2 What do you think about that today? I have to store very large XML strings, but: - LVARCHAR is too small (just up to 32000 characters, my XML can reach over 600000 characters for each string) - CLOB can only insert data using LOAD - IfxMRData needs other Informix components to be used Any suggestion? Thank you Francesco
For simplicity, if the XML will not be modified once it is written, you
could use a TEXT type column. The downside is that if you want to do
HDR/RSS/SDS replication the TEXT column must reside "IN TABLE" which is
less efficient than using blobspaces.
If the XML values need to be updated periodically then you are better off
using a CLOB. I don't know where you got the idea that you can only use
LOAD to fill a CLOB/BLOB type column, but that is just not true. You canload data into a CLOB or BLOB type smartblob column using any host language
(so ESQL/C, C++, Perl, Ruby, PHP, etc.). This is not as simple as
inserting data into an LVARCHAR or even a TEXT/BYTE type simple large
object column, but certainly doable.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Wed, May 30, 2012 at 5:31 AM, Francesco Veroni <checco_vero@libero.it>wrote:
> Related to this old discussion:
>
> https://groups.google.com/group/comp.databases.informix/browse_thread/thread/67afa567b8d12674/e51b96215e9922c2?hl=it&lnk=gst&q=xml+data+typ3#e51b96215e9922c2
>
> What do you think about that today?
>
> I have to store very large XML strings, but:
> - LVARCHAR is too small (just up to 32000 characters, my XML can reach
> over 600000 characters for each string)
> - CLOB can only insert data using LOAD
> - IfxMRData needs other Informix components to be used
>
> Any suggestion?
>
> Thank you
> Francesco
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>