One big advantage of RDBMS is SQL as a very declarative and powerful querying language. I know MongoDB has a query language, but it does not cover joins. Has anyone attempted to make an advanced query language for MongoDB that
a) Handles joining across different collections?
b) Handles joins smartly by looking at indexes in collections and cardinality of the indexes -- i.e. mimic query planning in SQL?
It seems like you should be able to write a higher level query language that uses (b) to smartly output combination of Javascript code and Mongo native queries that perform (a).