Message Boards Message Boards


MongoDB and Mathematica

Posted 5 years ago
6 Replies
12 Total Likes
Hi everyone,

I'm looking for a database link between Mathematica and MongoDB. Is it possible? I see nothing about this in the DatabaseLink reference. Any ideas?

6 Replies
Hi Steeve,

I am not aware of a direct link between mathematica and MongoDB but could I recommend using JLink and then writting your mongo interface through Java?

Even though it is not a complete solution I know MongoDB does have a REST interface that you could interface through... however it has no support for insert/update/remove operations... But you could read your data at least and you can use Mathematica's ability to communicate through HTTP requests to read the data.

If you aren't completely locked into Mongo you could also look at couchdb ( which does have a fully formed REST API. It also takes an optimistic approach to data and instead of locking an entire local instance of the database to write data it versions data which also allows for ACID compliance as opposed to Mongo's partial ACID compliance. All of this being said CouchDB does seem to only allow you to query through map/reduce (and often you just have to write the map function. I am also still not clear on how their indexing works, but it appears to index through the map functions that are written.. I really need to do something with this data store to understand how it works better).

All in all I have used mongo before and love it. I have not used couchdb yet but it could be an alternative if you aren't willing/can't create a java interface for mongodb.

Adam Martinek
Posted 3 years ago

Hello! Old thread, but I recently made my MongoDB Mathematica driver open-source here:

Here is a related SE post:

There is a good presentation with practical code examples about Mathematica with MongoDB here:

MongoDB with WL- .NB Presentation

Wolfram Language 11.3 now has support for interfacing with MongoDB:

That's cool! Thanks for sharing this new feature.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract