Mongodb:
It's an in-memory database, and the data is in memory.
The operation of the data is mostly in memory, but MongoDB is not a pure memory database.
Persistence mode:
All of MongoDB's data is actually stored on the hard disk, and all the data to be manipulated is mapped to an area of memory in a mmap way.
MongoDB then modifies the data in this area to avoid fragmented hard disk operations.
As for the contents of mmap flush to the hard disk is the operating system, so if, MongoDB in memory after modifying the data, MMAP data flush to the hard disk before the system down, the data will be lost.
Mmap Detailed Links: http://www.cnblogs.com/techdoc/archive/2010/12/22/1913521.html
Redis
It is a no-no memory database.
Persistence mode:
All Redis data is in memory and persisted using an RDB or AoF method.
Decrypt Redis Persistence: http://blog.nosqlfan.com/html/3813.html
Mysql:
Both the data and the index are stored on the hard disk. To be swapped into memory when it is to be used. Ability to handle data that is far more than the total amount of memory.
Mongodb,redis,mysql Brief comparison