You can turn a Postgres db into an API with PostgREST, and it supports jsonb to retrieve json properties.<p><a href="https://github.com/begriffs/postgrest" rel="nofollow">https://github.com/begriffs/postgrest</a>
How are JSON updates handled?<p>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.<p>[1] <i>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 document out, appending the new values and writing it back, letting the JSON parser sort out the duplicates.</i>
<a href="https://blog.compose.io/is-postgresql-your-next-json-database/" rel="nofollow">https://blog.compose.io/is-postgresql-your-next-json-databas...</a>
DB2 also implements the MongoDB query language: <a href="http://www.ibm.com/developerworks/data/library/techarticle/dm-1306nosqlforjson4/" rel="nofollow">http://www.ibm.com/developerworks/data/library/techarticle/d...</a><p>So does CouchDB: <a href="https://cloudant.com/blog/couchdb-and-mongodb-let-our-query-apis-combine/#.VTT4YpTF-0o" rel="nofollow">https://cloudant.com/blog/couchdb-and-mongodb-let-our-query-...</a>
Álvaro here from ToroDB.<p>Check out ToroDB (github.com/torodb/torodb). It is a Mongo implementation based on PostgreSQL that transforms JSON documents into relational tables. This has many advantages like significant storage reduction, less I/O required and it allows for updates (a concern raised on some comments below). Please check it out! :)
I was going to post that this would have been cool a year ago, but now that MongoDB has interchangeable backends there's not much to gain from a high level project like this.<p>But then I saw that this project started two years ago, and the last commit was a year ago.
I've been working on something similar for the last while, but using jsonb and plpgsql instead of plv8.<p>So far, the basic crud stuff works and there's a python driver with decent test coverage. Progress is slow, but it's fun!<p><a href="http://bedquiltdb.github.io" rel="nofollow">http://bedquiltdb.github.io</a>
Something else that provides a simple API for working with JSON in Postgres: <a href="https://github.com/robconery/massive-js" rel="nofollow">https://github.com/robconery/massive-js</a> (node.js)
At the bottom of the README it says "Follow along at <a href="http://legitimatesounding.com/blog/"" rel="nofollow">http://legitimatesounding.com/blog/"</a>, which 404's. I want to follow along! Please fix. Thanks.
There's also Mongres which was inspired by this project.<p><a href="https://github.com/umitanuki/mongres" rel="nofollow">https://github.com/umitanuki/mongres</a>
I thought MongoDb:s main selling point was the simple scale-out model? At least that's what stuck with me. I'm well aware about the non-robustness properties of Mongo, but to me it seems like calling this a clone without the scale-out capabilities would be missing the point.
Python has a nice non-SQL style interface to SQL engines too, called Dataset: <a href="http://dataset.readthedocs.org/en/latest/" rel="nofollow">http://dataset.readthedocs.org/en/latest/</a>
Makes sense they're porting MongoDB to Postgres, given that:<p>"As of version 9.4, PostgreSQL benchmarks faster than MongoDB for both inserting and querying JSON data." :P