Choosing Purpose-Built Databases for Particular Data Shapes
This lesson explains the AWS databases built for particular data shapes and access patterns, how to recognise when a scenario calls for one, and how to get data in and out of it.
Learning outcomes
After completing this lesson, you will be able to:
- Match data models to purpose-built databases.
- Recognise the signals in a question that point to a database.
- Move data from operational stores to analytics.
Which database for which shape
AWS offers specialised databases for particular data models. The following table describes the data model of each and when it should be chosen.
| Database | Data model | Choose when |
|---|---|---|
| Amazon Keyspaces | Wide-column, Apache Cassandra compatible (CQL) | Migrating Cassandra workloads; serverless, high-scale key-based access |
| Amazon Neptune | Graph (Gremlin, openCypher, SPARQL) | Relationships are the query: fraud rings, recommendations, knowledge graphs |
| Amazon DocumentDB | JSON documents, MongoDB compatible | Migrating MongoDB applications; flexible nested documents |
| Amazon OpenSearch Service | Search index | Full-text search, log analytics, vector search |
| Amazon MemoryDB | Durable in-memory key-value (Valkey/Redis compatible) | Microsecond reads with durability as a primary database |
| Amazon ElastiCache | In-memory cache | Caching in front of another database; session stores |
The following diagram shows the fraud question as a graph traversal.

Specialised databases
Signals in the question
Exam questions often contain a phrase that points to a particular data store. "Existing Cassandra application with minimal code changes" points to Amazon Keyspaces, which is compatible with Cassandra. "Find connections several hops away", such as friends of friends or fraud rings, points to Amazon Neptune, because a relational database would need many self-joins.
"MongoDB drivers" or "MongoDB compatibility" points to Amazon DocumentDB. "Search by keywords with relevance ranking" or "semantic similarity" points to Amazon OpenSearch Service, or another vector store for semantic search.
Moving data to analytics
Operational databases are designed to serve applications, not heavy analytics, and analytical queries against them slow down the applications that depend on them. Data is therefore moved into analytics stores, and each specialised database has its own paths.
Data can be exported or captured with change data capture (CDC) into Amazon S3: AWS DMS supports Amazon DocumentDB as a source, and Amazon Keyspaces and Amazon Neptune offer exports and change streams. Amazon OpenSearch Ingestion pipelines load data into OpenSearch from S3, Kinesis or DynamoDB. Where they are available, zero-ETL integrations replicate data continuously with no pipeline to build.
Specialised data to analytics
A payments company wants to find accounts linked to known fraudsters through shared devices, cards and addresses, up to four connections away, and to answer each query in under a second.
The relationships are the query, so this is a graph problem for Amazon Neptune: accounts, devices, cards and addresses become vertices, shared use becomes edges, and a Gremlin or openCypher traversal follows up to four hops in milliseconds. A relational database would need four self-joins over very large tables, and DynamoDB has no traversal capability.
Which database suits queries that follow relationships across several hops?
Show answer
Amazon Neptune, a graph database.
Exam Tips
Remember for the exam
- Keyspaces for Cassandra workloads; DocumentDB for MongoDB workloads.
- Neptune when relationships and multi-hop traversals are the core queries.
- OpenSearch for full-text, log and vector search.
- MemoryDB is a durable in-memory database; ElastiCache is a cache.
- Move data to the lake with exports, CDC or zero-ETL rather than querying operational stores.