Choosing the Best NoSQL Database | DocumentDB vs DynamoDB vs MongoDB

Untitled 1

We have already discussed DynamoDB in my previous Blog and even learn how to write queries and perform CRUD Operations. In this Blog, we will differentiate DocumentDB vs DynamoDB vs MongoDB. These three NoSQL databases all provide cloud solutions. DocumentDB is compatible with MongoDB so all existing mongo tools just continue to work with DocumentDB the same you would expect them to work with MongoDB.

DocumentDB vs DynamoDB vs MongoDB

Features DynamoDB MongoDB DocumentDB
Terminology Table/Items/Attributes/Primary Key/Secondary Key Collection/Document/Field/Primary Key/Secondary Key Collection/Document/Field/Primary Key/Secondary Key
Data Model Key-Value and document data with JSON support. BSON(JSON Like) document BSON(JSON Like) document
Primary Key 1. Partition(Hash) Key
2. Partition(Hash) Key and Sort(range) Key
Automatically assigned to document upon insert. Automatically assigned to document upon insert.
Index 1. Indexed are Provisioned Separately for Data
2. Global Secondary Indexes(GSI) are defined at any time with different partition keys and different sort keys.
3. Local Secondary Indexes(LSI) must be defined when a table is created with the same Partition Key and a different sort key.
4. Upto 5 GSIs and LSIs Per Table
1. Add Secondary Index on any Field
2. Index is consistent with data
3. Indexing strategies include: Compound, Unique, Array, Partial, TTL, geospatial, sparse, hash and text
1. Add Secondary Index on any Field
2. Index is consistent with data
3. Indexing strategies include: Compound, Unique, Array, Partial, TTL, geospatial, sparse, hash and text
Query 1. Key Condition Expression
2. Filter Expression
3. Sort (Not available on Scan)
1. Fields Projection
2. Sort
3. Filter Condition
1. Fields Projection
2. Sort
3. Filter Condition
Backup DynamoDB has DynamoDB Streams with a point in time recovery MongoDB Atlas includes continuous, queryable backup with a point in time recovery. Amazon DocumentDB (with MongoDB compatibility) includes continuous backup to Amazon Simple Storage Service for 1-35 days with a point in time recovery within the backup retention period.
Replication DynamoDB Synchronously replicates data across three facilities in an AWS region. Dynamo DB Provides Dynamo DB Stream with Global Table options. MongoDB automatically maintains replica sets, multiple copies of data that are distributed across servers, racks and data centres. You can achieve high availability and read scaling in Amazon DocumentDB (with MongoDB compatibility) by using replica instances.
Programming 1. Support Asynchronous Programming
2. Aggregate Function with exporting data to AWS Redshift/EMR or enable DynamoDB Stream.
1. Support Both Synchronous and Asynchronous Programming
2. Perform Aggregation: The aggregation Pipeline, the map-reduce function and single purpose aggregation methods.
1. Support Both Synchronous and Asynchronous Programming
2. Perform Aggregation: The aggregation Pipeline, the map-reduce function and single purpose aggregation methods.
Installation Setup Fully Managed AWS Service MongoDB Atlas is DBaaS(Database as a Service) on AWS/Azure/GCP Fully Managed AWS Service

This all the differences between DocumentDB vs DynamoDB vs MongoDB. MongoDB and DocumentDB are much alike so let’s discuss few differences between them.

AWS DocumentDB vs MongoDB Atlas

  1. MongoDB Compatible – MongoDB 3.6 and 4.0 APIs. Not All APIs
  2. MongoDB Server is more powerful than AWS DocumentDB.
  3. In DocumentDB – Single Primary constrained to a single region with up to 15 replicas Whereas in MongoDB, Global clusters, with up to 50 replicas per shard across multiple regions
  4. In DocumentDB -No sharding, single primary only. Largest instance supports 30,000 concurrent connections Whereas in MongoDB, Largest Atlas instance supports 128,000 concurrent connections. Full sharding support.

 

SQL vs. Nonrelational Terminology

DocumentDB vs DynamoDB vs MongoDB

 

SQL MongoDB
Table Collection
Row Document
Column Field
Primary key ObjectId

Conclusion

MongoDB is the leading solution. It provides more features such as data validation and more data type than DynamoDB.Atla’s cost stays the same until you scale up the storage needs.

AWS DynamoDB starts with the lowest cost. Easy Setup & Maintainance on security and tables.DynamoDB uses asynchronous programming with a great coding document.

Hope you like our DocumentDB vs DynamoDB vs MongoDB Blog. Please subscribe to our Blog for the upcoming Blog.

Reference:

https://www.mongodb.com/atlas-vs-amazon-documentdb

Be the first to comment on "Choosing the Best NoSQL Database | DocumentDB vs DynamoDB vs MongoDB"

Leave a comment

Your email address will not be published.


*