mongo vs redis
architecture – When to Redis? When to MongoDB? – Stack Overflow
caching – Is Redis just a cache? – Stack Overflow
Redis as the primary data store? WTF?!
Redis is based on key-value pair
save to:memory
fast
not reliable
List, HashMap,List 构成的 distributed database
结构和关系:
based on key-value pair
database
table
tuple: tuple has strict schema limit
Mongo is based on document
save to:disk
not so fast
reliable
结构和关系:
based on document
database
collection
document: document is schemaless
结论:
如果优先考虑性能,且需要和有意愿花时间在性能优化上,那么用:Redis
如果是搭建原型且不需要太操心数据库的话,用:MongoDB
转载请注明:在路上 » 【整理】mongo和redis对比