服务 · 数据库
Amazon DocumentDB
A managed document database for JSON-like data, compatible with MongoDB.
本课尚未翻译,暂以英文显示。
- 1AWS Database Migration Service (AWS DMS) reads the data from the MongoDB database you run today.
- 2DMS writes the documents into DocumentDB and keeps them in sync until you switch.
- 3The application connects to DocumentDB with the same MongoDB drivers and code.
分步说明
- 1AWS Database Migration Service (AWS DMS) reads the data from the MongoDB database you run today.
- 2DMS writes the documents into DocumentDB and keeps them in sync until you switch.
- 3The application connects to DocumentDB with the same MongoDB drivers and code.
Data model
- DocumentDB
- JSON-like documents
- DynamoDB
- Key-value items, which can also hold documents
How you find data
- DocumentDB
- Rich queries on any field
- DynamoDB
- Fast lookups by key
Choose it when
- DocumentDB
- You use MongoDB, or need flexible queries over documents
- DynamoDB
- You need the same fast response at any scale
| 比较项 | DocumentDB | DynamoDB |
|---|---|---|
| Data model | JSON-like documents | Key-value items, which can also hold documents |
| How you find data | Rich queries on any field | Fast lookups by key |
| Choose it when | You use MongoDB, or need flexible queries over documents | You need the same fast response at any scale |
是什么
Amazon DocumentDB (with MongoDB compatibility) is a fully managed document database. It stores data as JSON-like documents. Each document can have its own fields, including lists and nested values, and you can query on any field.
DocumentDB is compatible with MongoDB APIs and drivers, so applications built for MongoDB can keep the same code, drivers and tools. AWS handles the hardware, patching, backups and replication.
Storage grows automatically, and six copies of the data are kept across three Availability Zones. You can add replicas for more read capacity. If the primary instance fails, a replica takes over.
要记住
- Document database: JSON-like documents with flexible fields.
- Compatible with MongoDB: the same code, drivers and tools.
- Good for content management, product catalogs and user profiles.
- Six copies of the data across three Availability Zones.
- AWS DMS can move an existing MongoDB database into DocumentDB.
考试中
- “Move a MongoDB workload to a managed AWS database” points to Amazon DocumentDB.
- “Store JSON documents and query them on any field” points to DocumentDB. For simple key lookups at massive scale, Amazon DynamoDB fits better.