How can we use MongoDb with postgresql?

Which will be a better to use 1) Mongodb with Redis or 2) Mysql with Memcached?

  • Many a times question comes like "What is the use of Redis with Mongodb ?" I have seen the answers as if Mongodb is equivalent to Mysql then Redis is equivalent to Memcached. I have a doubt that which one is better to use ? 1) Mongodb with Redis  , OR 2) Mysql with Memcached.

  • Answer:

    Edit Got corrected by a friend offline: 1) Practically speaking, Redis IS a good replacement for Memcached. 2) MongoDB is more than an in-memory DB. Consecutively, if you are using Mongo as a large data storage and considering a Memcached in front of it, Redis is a reasonable alternative. Original Memcached is an in-memory caching layer. Redis and MongoDb are in-memory databases. They are not designed to play well together: you are better off dedicating all the memory to Redis alone or to MongoDb alone. (Memcached technically can be used as a database on its own, but you don't want to be doing it.) The choice between MySql and Redis/MongoDb boils down to SQL/NoSQL decision. Without extra domain knowledge, my vote goes to NoSQL. The launch of Facebook Presto keeps showing that NoSQL is getting more and more powerful. But I'm biased. For extremely convincing arguments see http://howfuckedismydatabase.com/mysql/ and the whole http://howfuckedismydatabase.com/ in general.

Dima Korolev at Quora Visit the source

Was this solution helpful to you?

Other answers

It depends. You need to consider a lot of things. for example,crash recovery,security,backup and restore,memory cost and io cost ... Talking about performance , MySQL is better than MongoDB. Memcached is the same as Redis because they  are both in-memory database。 Redis is better than Memcached  because it's not just a key-value store,it's a data structure server and it can be persisted。

Gary Armani

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.