So, I couldn’t stop asking myself is there a need for a (new) document query language?
To be able to answer this question, I thought I should firstly review what are the existing solutions/approaches.
- MongoDB allows dynamic and pretty complex queries, but it is using a custom query API.
- RavenDB, the latest addition to the document database space, has chosen the route of Linq for defining indexes.
- Terrastore supports predicate (XPath currently) and range queries offering a mapreduce-like solution. You can read more about these in the Terrastore 0.5.0 article
- Last, but not least, XML databases are using XPath for querying.
Simply put, it looks like each solution comes with its own approach. While it will probably make sense to create a unified query language for document databases, I see only two possible solutions:
- either make all document databases sign up to use this query language (note: this might be quite difficult)
- or provide it through a framework that works will all of the existing document stores (note: this might not be possible)
But do not create a new query language in a framework that works only with a single document store.