Search code examples
mysqlxmlgoogle-custom-search

What is the practical purpose of XML, that MySQL does not have?


I am interested in XML. I know it from Google's CSE.

It is often a pain for me to manipulate 3000-rows XML files. This raises a question.

Why does Google use XML, not MySQL, such that I need to manipulate large XML -files?


Solution

  • XML has at least these advantages over SQL for data interchange purposes:

    • It's self-describing, you don't need to have any additional information to parse it.
    • It's a true standard, universally interoperable.
    • You aren't limited to tabular-oriented data: you can also use it to model hierarchies, for instance.

    Probably the best you can do with SQL is ship tables in source code form, ie, as CREATE TABLE statements followed by a lot of INSERT statements. This is fine if you have a compatible database, but since SQL never really crystallized as a standard, interoperability at this level is very poor, and Google would have to offer multiple dialects (perhaps even for incompatible versions of the same DBMS).