DBDB.io The Encyclopedia of Database Systems · Est. 2017
Database of Databases

Database Entry

DocumentDB


Amazon DocumentDB is a document database service that supports MongoDB workloads.

Database Entry

DocumentDB


Amazon DocumentDB is a document database service that supports MongoDB workloads.

Data Model


Indexes[04][05]


Amazon DocumentDB supports various different types of indexes. Single field indexes are user-defined indexes on a single field of a document. Compound indexes are user-defined indexes on multiple fields of a document. Multikey indexes are indexes on array fields - although DocumentDB does not support this yet, its query planner can use multiple indexes in a single query, and so it can emulate a multikey index by creating an individual index for every desired array field.

There are additional properties available for all indexes. The TTL property removes documents from collections after an interval of time specified by the user. The Unique property rejects duplicate values for indexed fields. The Sparse property skips documents which do not contain the desired field. The Background property builds the index in the background so that other applications are able to access data even when the index is being built.

Isolation Levels[06]


Within a single document, a write operation to a DocumentDB cluster is atomic. A read operation returns only data that was durable before the query execution started, and does not return any data that was modified after. Dirty reads are not possible.

Joins[07][08]


DocumentDB does not support joins (unlike MongoDB which supports the left outer join via the $lookup operator).

Logging[09]


Logging is done via AWS CloudTrail, which logs all API calls by the clients as events and makes the most recent events available on the CloudTrail console under 'Event history'. It is also possible to configure CloudTrail so that the logs are stored in an Amazon S3 bucket.

Query Interface[10][11]


DocumentDB can be accessed using a Mongo shell to create, read, update and delete documents. It can also be accessed programmatically using the MongoDB drivers for Python, Node.js, PHP, Go, Java, and C#.

Stored Procedures[12][13]


Amazon DocumentDB does not support stored procedures, and unlike MongoDB it does not support stored javascript either.

Citations

14 sources
  1. Amazon DocumentDB- Serverless, fully managed, MongoDB API-compatible document database amazon.com
  2. Managed Cloud Database -- Amazon DocumentDB (with MongoDB compatibility) Resources -- Amazon Web Services amazon.com
  3. Amazon DocumentDB - Wikipedia wikipedia.org
  4. What is Amazon DocumentDB (with MongoDB compatibility) - Amazon DocumentDB amazon.com
  5. Functional differences: Amazon DocumentDB and MongoDB - Amazon DocumentDB amazon.com
  6. Amazon DocumentDB: how it works - Amazon DocumentDB amazon.com
  7. What is Amazon DocumentDB (with MongoDB compatibility) - Amazon DocumentDB amazon.com
  8. $lookup (aggregation stage) - Database Manual - MongoDB Docs mongodb.com
  9. Logging Amazon DocumentDB API calls with AWS CloudTrail - Amazon DocumentDB amazon.com
  10. Connecting programmatically to Amazon DocumentDB - Amazon DocumentDB amazon.com
  11. What is Amazon DocumentDB (with MongoDB compatibility) - Amazon DocumentDB amazon.com
  12. What is Amazon DocumentDB (with MongoDB compatibility) - Amazon DocumentDB amazon.com
  13. Store a JavaScript Function on the Server - Database Manual - MongoDB Docs mongodb.com
  14. https://www.businesswire.com/news/home/20190109005887/en/AWS-Announces-Amazon-DocumentDB-MongoDB-Compatibility businesswire.com
Revision #13