Monday, 15 March 2010

table - db2 - accessing xml data that has been zipped -



table - db2 - accessing xml data that has been zipped -

is possible utilize db2 table stuff create query on column if column contains zipped xml?

if so, trivial illustration be?

that is, given table:

| id | zipped_content | 0 | zipped content here 1 time xml

where zipped content might like:

<animals> <cat> <name>fluffy</name> <age>12</age> <cat> <dog> <name>snoopy</name> <age>32</age> <dog> </animals>

can run query will, given id pull out info zipped_content?

that is, name , age of each animal only? that's little tricky xml db2 stuff - presumably drift. can unzip , utilize tables stuff, or impossible?

you could, performance absolutely kill applications. can't utilize indexes on construction of compressed xml. also, uncompressing require temporary memory space, , need think caching well.

why zipping xml? honest can think of few valid reasons that.

if transporting on rest api or similar, create sure web servers utilize deflate or gzip, , reach compression without losing much performance.

if wish save space, inquire db2 compress table you.

if other weird requirements, store both zipped , unzipped version. utilize triggers update other when other gets changed.

if want go on , utilize compressed fields should combination of stored procedures , sql queries. might want develop compression/decompression procedure , combine using temporary tables, or develop procedure handle queries - or combination of both. yes, c/c++/java development required.

xml table zip db2

No comments:

Post a Comment