Database Management – Moving Data Between Databases with XML

databasexml

I just read this quote online:

XML is a very useful technology for moving data between different databases or between databases and other programs. However, it is not itself a database.

Which is quoted from the book 'Effective XML: 50 Specific Ways to Improve Your XML'.

I don't understand what you would bother moving data between databases in an XML format. Databases usually contain a lot of data, so wouldn't it be verbose to transform it into an XML format?

Is there no way, to just serialize the database data into something less verbose, somehow, instead of bothering with conversions?

Best Answer

XML has two very important attributes that make it attractive for data transfer between heterogenous systems:

  1. You can pass it through firewalls, and
  2. You can usually find reader/writer libraries already written to create and parse it.

If you're looking for something less verbose that still has both of these attributes, you can try using JSON.

If you're simply transferring data between two homogeneous databases on the same network, there are probably easier ways. For example, Microsoft SQL Server has at least three different ways to transfer data between databases: Bulk Insert, SSIS, and Replication.

Related Topic