Wednesday, September 30, 2009

SQL versus Xquery versus SPARQL!

There is no argument that sql is the most widely used query language and has been in use for decades. It is a long established standard and has been primarily used for tabular data. Millions of developers already know it and tt always tends to get complex when more tables are used. I will avoid talking more about it as I am assuming that people who are reading this blog will know about the limitations and pain points of sql.

Lets focus more on the new query languages like xquery and sparql:

Xquery is great for finding data in tree representations.  You will find almost all relational database vendors mixing xquery with sql though it tends to get very complex. Xquery is even becoming part of sql standard now. Xquery works great with native xml databases like marklogic and xhive (now Documentum). Xquery is most popular with content publishers. It is a standalone programming language for information intensive applications. To get deeper into this, please use this brilliant prez.. Xquery is still a relatively new standard so the developer community is nowhere in the league of sql.

Sparql is more useful in a pattern matching paradigm when you have to traverse many relationships. It makes federated queries possible, and federated queries can be thought of as queries made simultaneously to multiple, disparate databases that could be located anywhere on a network. This is a key concept in making disparate and separate data stores seem like a single respository. Those who want to dive deeper into sparql should use this tutorial.

No comments:

Post a Comment