Mongo DB I have used and and know many thing about it, but not very much friendly with Dynamo DB.
-
2Some discussion over at http://stackoverflow.com/questions/17931073/dynamodb-vs-mongodb-nosql – Thilo Dec 14 '16 at 09:02
-
[Document-oriented database](https://en.wikipedia.org/wiki/Document-oriented_database) vs [Column family](https://en.wikipedia.org/wiki/Column_family) – Ali Dehghani Dec 14 '16 at 09:03
1 Answers
DynamoDB:-
1) Basically, DynamoDB is a key-value store. Also, it does support the document data types as well i.e. List and Map. However, you can't create indexes on document data types.
2) While querying the table, you must have Hash key. Otherwise, you need to scan the entire database which is a very costly operation.
3) In terms of indexes, it has Global secondary index and Local Secondary index. Indexes will be managed by database automatically. In normal situation, it will be updated in seconds. However, the update process is asynchronous.
4) The API has to directly query the index. In MongoDB, based on the query fields, the database will select the appropriate winning plan. This is not available in DynamoDB.
5) It can auto-scale without degrade in performance
6) In terms of frameworks, there is only community edition of Spring-data framework available for DynamoDB
7) There is no aggregation framework
8) Need to write program to get the basic details on the tables. For example, get the outstanding orders. You can't just query the database like Mongo shell queries. You need to write program to query/scan the database to get the required details
9) Works fine as long as there is no complex objects (i.e. embedded objects in the document). Otherwise, querying and updating the objects will be little complex
10) AWS SDK doesn't have mapper class (i.e. Java class DynamoDBMapper)
11) The database is eventually consistent
MongoDB:-
1) Good query capabilities
2) Aggregation framework
3) Supports complex indexes, text search, Geo-Spatial index support
4) Supports shrading
5) Scale horizontally
6) Standard frameworks available
7) Easy to create collection and documents
8) Support capped collection
9) TTL support
10) Large number of frameworks available in almost all programming languages (Java, Dot Net, Node JS etc.)

- 37,595
- 6
- 111
- 105