1. Redis :
Redis 代表远程字典服务器,它是一个内存数据结构项目,实现了具有可选持久性的分布式内存键值数据库。 Redis 由 Redis 实验室开发,最初于 2009 年 5 月 10 日发布。它是用 ANSI 和 C 语言编写的。 Redis 提供内存效率、运行速度快、可用性高,并提供一些特性,如可调性、复制、集群等。
2. MongoDB:
MongoDB 是一个跨平台的面向文档的非关系(即NoSQL)数据库程序。它是一个开源文档数据库,以键值对的形式存储数据。 MongoDB 由 MongoDB Inc. 开发,最初于 2009 年 2 月 11 日发布。它是用 C++、Go、JavaScript、 Python语言编写的。 MongoDB 提供高速、高可用性和高可扩展性。 Redis 和 MongoDB 的区别:
S.NO. | Redis | MongoDB |
---|---|---|
1. | It was developed by Redis labs and initially released on May 10, 2009. | It was developed by MongoDB Inc. and initially released on 11 February, 2009. |
2. | Redis is written in ANSI and C languages. | MongoDB is written in C++, Go, JavaScript and Python languages. |
3. | The primary database model for Redis is Key-Value Store. | The primary database model for MongoDB is Document Store. |
4. | Redis supported data types are strings, hashes, lists, sets and sorted sets, bit arrays, hyperloglogs and geospatial indexes. Hence, have partial predefined data types. | MongoDB supported data types are string, integer, double, decimal, boolean, date, object_id, geospatial. Hence, have predefined data types. |
5. | Redis supports secondary indexes with RediSearch module only. | MongoDB supports secondary indexes without any restrictions. |
6. | The Server-side scripting in Redis is through Lua. | The Server-side scripting in MongoDB is through JavaScript. |
7. | Redis supports both Master-Slave Replication and Master-Master Replication. | MongoDB supports only Master-Slave Replication. |
8. | Redis does not support Map Reduce method. | MongoDB supports Map Reduce method. |
9. | Server operating systems for Redis are BDS, Linux, OS X and Windows. | Server operating systems for MongoDB are Solaris, Linux, OS X and Windows. |
10. | Some companies like Twinkl Educational Publishing, Merrill Corporation, ASOS.com Limited, Owler, Inc., etc use Redis. | Some companies like Adobe, Amadeus, Lyft, ViaVarejo, Craftbase, etc use MongoDB. |