There are many NoSQL databases that have different. In this article, we will see the difference between two of the NoSQL databases - Redis and MongoDB.
Redis:
- Redis is written in ANSI and C languages.
- The primary database model for Redis is Key-Value Store.
- Redis is In-memory storage with on-disk persistence
- Redis supports data types are strings, hashes, lists, sets and sorted sets, bit arrays, hyperloglogs, and geospatial indexes. Hence, have partial predefined data types.
- Redis supports secondary indexes with RediSearch module only.
- Redis supports both Master-Slave Replication and Master-Master Replication.
- The Server-side scripting in Redis is through Lua.
- Server operating systems for Redis are BDS, Linux, OS X and Windows.
- Only Hash Sharding is supported in Redis.
- Manual failover is required if you need to promote a replica in another data centre to master.
MongoDB:
- MongoDB is written in C++, Go, JavaScript, and Python languages.
- The primary database model for MongoDB is Document Store.
- MongoDB is On-disk storage by default.(In-memory storage engine is available with MongoDB Enterprise Edition.)
- MongoDB supports data types are string, integer, double, decimal, boolean, date, object_id, geospatial. Hence, have predefined data types.
- MongoDB supports secondary indexes without any restrictions.
- MongoDB supports only Master-Slave Replication.
- The Server-side scripting in MongoDB is through JavaScript.
- Server operating systems for MongoDB are Solaris, Linux, OS X and Windows.
- Sharding(Partition data) by range, hash, or zone is supported in MongoDB.
- Automatic failover with replica set elections.
No comments:
Post a Comment