What is the advantage of mapping a relational database to XML, if we have CSV?
i.e. you can export a database to XML, but what is the point, if you can map it to CSV?
Does xml offer anything significant?
I'm not saying XmlSucks for mapping to relational. It could suck, I don't know. It depends on what the arguments are for and against it.. debate it here..
XML is trees - relational is tables. CSV is tables. Mapping trees (xml) to anti-trees (database), seems contradictory.
One advantage of XML is if the file is corrupted, it may be easier to recover than CSV using cut/copy/paste techniques.
<xml> <blah> <foo> @#&*CORRUPTED*$#@ 3*$*%843 OH*SH*T *$#&# </stuff> </bar> &*^&*^$ </xml>In the above corrupted XML file, we can cut out the corrupted areas and fill it in, whereas in CSV it may be harder since it's not like a human document or human script.
Corrupted CSV file:
blah, bar, foo&SDD*R^*&DSSHGUIT CORRUPTED &64385 w4o543895893u5984389543, blah, #$*(%$,foo,#(* ,blah foo, bar, data,If a CSV gets corrupted, it may "ruin" a line, but the next line will generally read in fine. This is similar to XML in that it mostly only damages the tag group that it's in. But the comparison may depend on how the XML maps to the table, for there are different ways to do it. And I'm not sure corruption correction should be the primary selection factor for choosing a format. It definitely should be looked at as a factor, but not be the overriding one.
See also: ObjectRelationalMapper, FlirtDataTextFormat