XML vs. SQL
Olly Betts
olly@survex.com
Wed, 10 Jan 2001 14:41:18 +0000
In message <01011014494200.00776@r-schuster>, Roger Schuster writes:
>following the recent discussion I got the impression that most cavers
>favorite a cave survey data format which is derived from XML or another
>type of markup language. I think XML isn't the "silver bullet" that can
>solve all problems and can be used for storing any kind of data. For
>exchanging data XML is good but poor for everyday work.
XML is the latest buzzword and there does seem to be a trend to use it for
anything and everything whether it makes sense or not. But it is actually a
reasonably good fit for cave survey data and at least avoids the arguments
about whether the format should be command based (SEF and CDO) or involve
nested brackets (HTO) or what have you. It's also easy to extend.
>What's about storing data in a SQL data base?
The problem is that SQL is a language for querying a database. The format
of the database to be queried isn't portable, only the language you query it
in. Many SQL implementations support extensions which aren't portable to
other implementations, so you need to be careful to stick to "pure" SQL if
you want portability.
So given a MySQL database on disk, it's not necessarily easy to read it with
Oracle (say). In general, you'd probably have to unload the data using
MySQL and then build a new database from it in Oracle. The exchange format
would really be this unloaded form.
OTOH, the reasons you list make SQL a good choice for representing data
inside a survey program. It's actually one of the options we're considering
for project spud (aka survex version 2).
Cheers,
Olly