DB2 also implements the MongoDB query language: http://www.ibm.com/developerworks/data/library/techarticle/d... So does CouchDB: https://cloudant.com/blog/couchdb-and-mongodb-let-our-query-...
A proof of concept MongoDB clone built on Postgres
31–40 of 51 posts
Re: A proof of concept MongoDB clone built on Postgres
#32Earlier quoted context omitted.
I suspect there are lots of people who built applications on top of MongoDB who would like to transition away from Mongo onto a different database, or would at least like the option to be able to to. This may provide a good mechanism for a transition. Which leads to a question for the OP: does this work with mongoose.js?
> I suspect there are lots of people who built applications on top of MongoDB who would like to transition away from Mongo onto a different database What happened to separating the data access layer from the business logic layer? Oh yeah, "good architectural practices are so JEE ..." /s
Re: A proof of concept MongoDB clone built on Postgres
#33How are JSON updates handled? For those who aren't aware, Postgres currently lacks support for doing updates to JSON fields via SQL[1]. For many this isn't a problem, but I'd imagine that people expecting a MongoDB clone would need it. [1] But even though you can individually address the various fields within the JSON document, you can’t update a single field. Well, actually you can, but by extracting the entire JSON…
http://www.postgresql.org/message-id/flat/54E00D1F.9060101@d...
Re: A proof of concept MongoDB clone built on Postgres
#34How are JSON updates handled? For those who aren't aware, Postgres currently lacks support for doing updates to JSON fields via SQL[1]. For many this isn't a problem, but I'd imagine that people expecting a MongoDB clone would need it. [1] But even though you can individually address the various fields within the JSON document, you can’t update a single field. Well, actually you can, but by extracting the entire JSON…
Write a function in PLV8?
this is non-optimal, but currently the only method available.
Re: A proof of concept MongoDB clone built on Postgres
#35Earlier quoted context omitted.
Could be interessting for meteor.com, the mongodb only usage prevent me to use it.
problem : meteor relies on a specific mongodb feature,ie polling the db for any change. I heard there is experimental support for PG but it seems to rely on a complex hack using triggers ... So the issue isn't really about mongo queries, but whether it is possible to track db edits from third parties or not.
http://www.postgresql.org/docs/devel/static/logicaldecoding.... for the (somewhat low level) description of the feature. You'd have to write an output plugin that formats the output as json, but that should be pretty easy.
Disclaimer: I'm the author of the feature ;)
Re: A proof of concept MongoDB clone built on Postgres
#36Re: A proof of concept MongoDB clone built on Postgres
#37You can turn a Postgres db into an API with PostgREST, and it supports jsonb to retrieve json properties. https://github.com/begriffs/postgrest
Re: A proof of concept MongoDB clone built on Postgres
#38DB2 also implements the MongoDB query language: http://www.ibm.com/developerworks/data/library/techarticle/d... So does CouchDB: https://cloudant.com/blog/couchdb-and-mongodb-let-our-query-...
Note also that the Meteor project has "minimongo", which is yet another implementation of the MongoDB query language.
Re: A proof of concept MongoDB clone built on Postgres
#39Why?
I suspect there are lots of people who built applications on top of MongoDB who would like to transition away from Mongo onto a different database, or would at least like the option to be able to to. This may provide a good mechanism for a transition. Which leads to a question for the OP: does this work with mongoose.js?
in the end, i just wrote my own database system, with a query language that could act as an intermediary from multiple sources (SQL, mongo, etc).
but, this stuff is mostly just for fun, my day job keeps me plenty busy.