First 50 of 199 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Workload-Specific Database Design
A team is building an OLTP application that requires complex multi-table joins, foreign key constraints, and ACID transactions. Which AWS database service is the most appropriate primary store?
- Amazon RDS Correct answer.
- Amazon DynamoDB
- Amazon Neptune
- Amazon Redshift
Explanation
Amazon RDS provides managed relational engines that support joins, foreign keys, and ACID transactions, which are core OLTP requirements. DynamoDB is a key-value/document store without joins, Redshift is an analytics warehouse, and Neptune is a graph database.
Question 2Workload-Specific Database Design
Which AWS service is designed for storing and querying highly connected data with traversals across relationships, such as social graphs and fraud detection rings?
- Amazon Neptune Correct answer.
- Amazon DocumentDB
- Amazon Timestream
- Amazon Redshift
Explanation
Amazon Neptune is a purpose-built graph database that supports property-graph and RDF models with efficient multi-hop traversal queries. Relational, time-series, and document databases are not optimized for deep relationship traversal.
Question 3Workload-Specific Database Design
A web application needs a sub-millisecond, in-memory session store shared across many stateless application servers. Which AWS service fits this requirement best?
- Amazon ElastiCache for Redis Correct answer.
- Amazon RDS
- Amazon S3
- Amazon Redshift
Explanation
ElastiCache for Redis is an in-memory data store that delivers sub-millisecond latency and supports shared session state across application servers. Disk-based relational databases, analytical warehouses, and object storage cannot meet that latency profile.
Question 4Workload-Specific Database Design
A company wants a petabyte-scale data warehouse for complex analytical queries over structured historical data. Which AWS service is purpose-built for this workload?
- Amazon Aurora
- Amazon Redshift Correct answer.
- Amazon DynamoDB
- Amazon Neptune
Explanation
Amazon Redshift is a columnar, massively parallel data warehouse designed for large-scale analytical SQL workloads. DynamoDB and Aurora are transactional stores, and Neptune is a graph database.
Question 5Workload-Specific Database Design
Which AWS service provides a transparent, immutable, and cryptographically verifiable transaction log for a ledger application?
- Amazon Keyspaces
- Amazon QLDB Correct answer.
- Amazon DynamoDB
- Amazon RDS
Explanation
Amazon QLDB maintains an append-only journal with cryptographic verification, making it suitable for ledger-style applications that require tamper-evident history. DynamoDB, RDS, and Keyspaces do not provide a native verifiable ledger journal.
Question 6Workload-Specific Database Design
An IoT platform ingests millions of timestamped sensor readings per second and runs time-windowed aggregations. Which database is purpose-built for this workload?
- Amazon DocumentDB
- Amazon Neptune
- Amazon Timestream Correct answer.
- Amazon Redshift
Explanation
Amazon Timestream is a purpose-built time-series database that handles high-volume timestamped ingestion and provides built-in time-window aggregation functions. Graph, document, and warehouse databases are not optimized for this ingestion and query pattern.
Question 7Workload-Specific Database Design
Which DynamoDB feature automatically deletes expired items based on a timestamp attribute without consuming write capacity?
- DynamoDB Accelerator
- Time to Live (TTL) Correct answer.
- Global Secondary Index
- DynamoDB Streams
Explanation
DynamoDB Time to Live deletes items after a specified timestamp attribute expires, and the deletion does not consume write capacity. Streams, DAX, and GSIs serve different purposes such as change capture, caching, and alternate query patterns.
Question 8Workload-Specific Database Design
An application uses MongoDB drivers and a document data model, and it needs a managed AWS service with MongoDB compatibility. Which service should be used?
- Amazon Keyspaces
- Amazon DynamoDB
- Amazon DocumentDB (with MongoDB compatibility) Correct answer.
- Amazon Neptune
Explanation
Amazon DocumentDB is a managed document database that is compatible with MongoDB drivers and tooling. DynamoDB uses proprietary APIs, Neptune is a graph database, and Keyspaces is Cassandra-compatible.
Question 9Workload-Specific Database Design
A DynamoDB table uses a partition key with only a few distinct values, causing throttling on a small number of partitions. What is the most effective design change?
- Use a high-cardinality partition key that spreads items evenly Correct answer.
- Add a Global Secondary Index on the same attribute
- Enable DynamoDB Streams
- Increase the table's provisioned read capacity only
Explanation
DynamoDB distributes items by partition key hash, so a low-cardinality key concentrates traffic on a few partitions and creates hot partitions. A high-cardinality key distributes items and requests more evenly across partitions.
Question 10Workload-Specific Database Design
A DynamoDB table is keyed by CustomerId. The application must query by OrderDate, which is not part of the base table key. What should be created?
- A read replica
- A global secondary index with OrderDate as the partition key Correct answer.
- A local secondary index with OrderDate as the sort key
- A DynamoDB Stream
Explanation
A global secondary index can use a partition key and sort key that differ from the base table, allowing queries by OrderDate. A local secondary index must share the base table's partition key, which would not support querying by OrderDate alone.
Question 11Workload-Specific Database Design
An application requires microsecond read latency for repeated item reads from a DynamoDB table and is heavily read-oriented. Which solution should be added?
- DynamoDB Streams
- DynamoDB Accelerator (DAX) Correct answer.
- Amazon RDS read replica
- Amazon ElastiCache for Memcached
Explanation
DAX is an in-memory write-through cache for DynamoDB that reduces read latency to microseconds for repeated item reads. Memcached, Streams, and RDS replicas do not provide a DynamoDB-native caching layer.
Question 12Workload-Specific Database Design
A relational database must survive an Availability Zone failure with automatic failover and no data loss, without changing the application connection string. Which RDS feature should be used?
- Multi-AZ deployment Correct answer.
- Read replica
- Performance Insights
- Cross-region snapshot copy
Explanation
An RDS Multi-AZ deployment maintains a synchronous standby in another Availability Zone and automatically fails over using the same endpoint. Read replicas are asynchronous and do not provide automatic failover, snapshot copies are manual, and Performance Insights is monitoring.
Question 13Workload-Specific Database Design
An application needs a relational database that can accept writes in more than one Availability Zone simultaneously, avoiding a single writer bottleneck. Which Aurora feature should be used?
- Aurora Global Database
- Aurora Backtrack
- Aurora Multi-Master Correct answer.
- Aurora Serverless v2
Explanation
Aurora Multi-Master allows multiple writer instances across Availability Zones to accept writes concurrently. Global Database maintains a single writer region, Backtrack rewinds data, and Serverless v2 adjusts capacity.
Question 14Workload-Specific Database Design
In Amazon Redshift, a small dimension table is frequently joined to a very large fact table. Which distribution style generally minimizes data movement for those joins?
- EVEN
- ALL Correct answer.
- AUTO with no sort key
- KEY on the fact table's join column
Explanation
The ALL distribution style broadcasts the entire small table to every compute node, so joins with a large fact table do not require redistributing the fact table. EVEN and KEY can require data movement for these joins.
Question 15Workload-Specific Database Design
Many Lambda functions open short-lived database connections to an RDS instance, exhausting the database connection limit. Which service addresses this problem?
- RDS Multi-AZ
- Aurora Global Database
- Amazon RDS Proxy Correct answer.
- Read replicas
Explanation
Amazon RDS Proxy pools and shares database connections, reducing the number of direct connections from Lambda functions. Multi-AZ, Global Database, and read replicas address availability and read scaling rather than connection pooling.
Question 16Workload-Specific Database Design
An application must react to item-level changes in a DynamoDB table in near real time and trigger a Lambda function. Which feature should be enabled?
- DynamoDB Streams Correct answer.
- DynamoDB Accelerator
- DynamoDB global tables
- DynamoDB TTL
Explanation
DynamoDB Streams records item-level changes in a table and can invoke Lambda for near real-time processing. TTL expires items, DAX caches reads, and global tables replicate data across regions.
Question 17Workload-Specific Database Design
A workload has unpredictable, spiky relational demand and needs automatic capacity scaling in fine-grained increments without managing database instances. Which Aurora option fits best?
- Aurora Backtrack
- Aurora Provisioned with read replicas
- Aurora Serverless v2 Correct answer.
- Aurora Global Database
Explanation
Aurora Serverless v2 scales capacity automatically in fine-grained increments based on demand and removes instance-sizing responsibilities. Provisioned Aurora requires choosing instance sizes, Global Database targets cross-region replication, and Backtrack rewinds data.
Question 18Workload-Specific Database Design
A team wants a managed, Cassandra-compatible database that uses CQL and supports tunable consistency. Which AWS service should be used?
- Amazon Keyspaces (for Apache Cassandra) Correct answer.
- Amazon QLDB
- Amazon DocumentDB
- Amazon DynamoDB
Explanation
Amazon Keyspaces is a managed, serverless database that is compatible with Apache Cassandra and CQL. DynamoDB uses its own API, DocumentDB is MongoDB-compatible, and QLDB is a ledger database.
Question 19Workload-Specific Database Design
A company keeps years of data in Amazon S3 and wants to query it from Redshift without loading it into Redshift tables. Which feature should be used?
- Redshift sort keys
- Amazon Redshift Spectrum Correct answer.
- Redshift distribution styles
- Redshift concurrency scaling
Explanation
Redshift Spectrum lets Redshift queries read data directly from external tables in Amazon S3. Distribution styles and sort keys organize local tables, and concurrency scaling adds query compute capacity.
Question 20Workload-Specific Database Design
Analysts need to run ad hoc SQL over Parquet files in Amazon S3 with no cluster provisioning and pay-per-query pricing. Which service fits best?
- Amazon RDS
- Amazon EMR
- Amazon Athena Correct answer.
- Amazon Redshift
Explanation
Amazon Athena is a serverless query service that runs SQL directly against data in Amazon S3 and charges per query scanned. Redshift and EMR require provisioned clusters, and RDS is a transactional database.
Question 21Workload-Specific Database Design
An Aurora MySQL cluster needs to recover from an accidental logical data error by rewinding the existing cluster to a point in time within the retention window, without restoring a new cluster. Which feature should be used?
- Aurora Global Database
- Aurora Backtrack Correct answer.
- Aurora Serverless v2
- Aurora Multi-Master
Explanation
Aurora Backtrack rewinds an existing Aurora MySQL cluster to a specified point in time without creating a new cluster. Global Database replicates across regions, Serverless v2 scales capacity, and Multi-Master adds concurrent writers.
Question 22Workload-Specific Database Design
A DynamoDB table is write-heavy and has a global secondary index whose partition key is a low-cardinality status attribute. Writes to the base table are being throttled even though the base table has sufficient capacity. What is the most likely cause?
- TTL is deleting items faster than they are written
- The GSI develops hot partitions and its insufficient write capacity throttles base table writes Correct answer.
- DAX is caching stale items and blocking writes
- The base table partition key has too many distinct values
Explanation
GSI updates occur as part of the base table write path, so if the index cannot absorb writes, the base table write can be throttled. A low-cardinality GSI partition key concentrates writes into few index partitions, worsening the problem.
Question 23Workload-Specific Database Design
A large Redshift table is almost always queried with a range predicate on an event_time column. Which table design best allows the query to skip blocks using zone maps?
- A compound sort key with event_time as the leading column Correct answer.
- Distribution style EVEN with no sort key
- A sort key on an unrelated column
- Distribution style ALL with no sort key
Explanation
Sorting rows by event_time causes related values to be stored together, so zone maps can eliminate blocks outside the predicate range. A sort key on an unrelated column or no sort key does not provide this pruning benefit.
Question 24Workload-Specific Database Design
Aurora Global Database replicates from a primary region to secondary regions. What recovery point objective does it typically provide for cross-region replication?
- About 1 second Correct answer.
- Zero, because replication is synchronous
- About 1 hour
- About 15 minutes
Explanation
Aurora Global Database uses storage-level replication and typically provides a recovery point objective of about one second across regions. Replication is asynchronous, so a zero RPO is not provided.
Question 25Workload-Specific Database Design
An application queries a DynamoDB global secondary index immediately after writing an item to the base table and sometimes does not see the new item. What explains this behavior?
- GSIs are always strongly consistent
- DAX is disabled
- The item was deleted by TTL
- GSI updates are asynchronous, so reads are eventually consistent Correct answer.
Explanation
DynamoDB propagates base table writes to global secondary indexes asynchronously, so GSI reads are eventually consistent and may briefly miss a just-written item. Strong consistency is available only on the base table, not on GSIs.
Question 26Workload-Specific Database Design
A social networking workload stores users and their friendships as highly connected data and must run traversal queries that follow relationships several hops deep. Which AWS database service is purpose-built for this access pattern?
- Amazon Redshift with a denormalized friend table
- Amazon Neptune with nodes and edges stored as a graph Correct answer.
- Amazon DynamoDB with a global secondary index per hop
- Amazon RDS for PostgreSQL with a normalized friendship table
Explanation
Amazon Neptune is a purpose-built graph database that stores data as nodes and edges and traverses relationships without repeated index lookups or joins. Multi-hop traversal is a native operation, so latency stays low as depth increases.
Question 27Workload-Specific Database Design
A product catalog must support free-text search with relevance ranking, fuzzy matching, and faceted filtering across millions of documents. Which AWS service best fits this requirement?
- Amazon ElastiCache for Redis with a hash per product
- Amazon OpenSearch Service Correct answer.
- Amazon Redshift with a LIKE predicate
- Amazon DynamoDB with a scan on a keyword attribute
Explanation
OpenSearch Service is a search engine built on an inverted index that provides relevance scoring, fuzzy matching, and aggregations for facets. Key-value and relational engines cannot rank or tokenize text this way.
Question 28Workload-Specific Database Design
A read against a DynamoDB table must always return the most recently committed value, regardless of which storage replica serves the request. Which read option provides this?
- A read from a global secondary index
- A read with ReturnConsumedCapacity set to TOTAL
- An eventually consistent read
- A strongly consistent read Correct answer.
Explanation
DynamoDB replicates items across multiple Availability Zones, and eventually consistent reads may hit a replica that has not yet applied the latest write. A strongly consistent read is served from the leader node and therefore reflects all prior successful writes.
Question 29Workload-Specific Database Design
In an Amazon Redshift cluster, two multi-gigabyte tables are frequently joined on a shared customer_id column. Which design colocates the matching rows on the same slice?
- Assign DISTKEY customer_id to both tables Correct answer.
- Assign DISTSTYLE ALL to both tables
- Assign SORTKEY customer_id to both tables
- Assign DISTSTYLE EVEN to both tables
Explanation
When both tables use the same DISTKEY, rows with equal join-key values land on the same slice, so the join executes locally without network redistribution. Sort keys affect block pruning on range predicates, not row placement.
Question 30Workload-Specific Database Design
A production Amazon RDS for MySQL instance is saturated by a nightly read-only reporting job, while the transactional workload must stay responsive. Which change solves this with the least disruption?
- Create a read replica and point the reporting job at it Correct answer.
- Enable Multi-AZ and point the reporting job at the standby
- Increase the backup retention period on the instance
- Convert the instance to a Single-AZ deployment
Explanation
A read replica serves read-only traffic from a separate database instance, moving reporting load off the primary. Multi-AZ standbys exist only for failover and cannot be read from.
Question 31Workload-Specific Database Design
An application must serve low-latency reads and accept writes in three AWS Regions at the same time against the same key-value data set. Which DynamoDB capability delivers this?
- DynamoDB Accelerator (DAX) with a cluster per Region
- DynamoDB global tables with multi-Region replication Correct answer.
- On-demand backup and restore into each Region
- Read replicas built from DynamoDB Streams consumers
Explanation
Global tables create a multi-Region, multi-active replica set where each Region accepts writes and replicates them to the others. Reads and writes are served locally in every participating Region.
Question 32Workload-Specific Database Design
A real-time gaming leaderboard must return the top 100 players and an individual player's rank in milliseconds. Which store and data structure best fits?
- Amazon ElastiCache for Redis using a sorted set Correct answer.
- Amazon S3 with a precomputed leaderboard object
- Amazon DynamoDB with a scan and client-side sorting
- Amazon RDS with an ORDER BY query on a players table
Explanation
A Redis sorted set keeps members ordered by score and returns rank and range queries in logarithmic time from memory. This is the canonical structure for live leaderboards.
Question 33Workload-Specific Database Design
A geospatial application needs spatial indexes along with geometry functions such as ST_Distance and ST_Contains inside a managed relational database. Which choice provides this?
- Amazon DynamoDB with a geohash partition key
- Amazon Aurora PostgreSQL with the PostGIS extension Correct answer.
- Amazon ElastiCache for Memcached with binary blobs
- Amazon Redshift with a sort key on latitude
Explanation
Aurora PostgreSQL supports PostgreSQL extensions, and PostGIS adds spatial data types, GiST spatial indexes, and geometry functions executed inside the database. The other engines either lack spatial types or cannot execute these functions at all.
Question 34Workload-Specific Database Design
A DynamoDB table must store an organization hierarchy so that one request returns a manager record and all of that manager's direct reports. Which key design supports this?
- Use the manager id as the partition key and keep reports in a separate table per manager
- Store the manager and report items under the same partition key per organization Correct answer.
- Use a random partition key for every item and scan the table for reports
- Use the employee id as the partition key and the manager id as the sort key
Explanation
The adjacency-list pattern places the parent item and its child items in the same item collection by sharing a partition key, so a single Query returns the whole related set. Item collections are the DynamoDB mechanism for one-to-many relationships.
Question 35Workload-Specific Database Design
A DynamoDB table uses partition key deviceId and sort key reading#<ISO-8601 timestamp>. An application needs all readings for one device on one calendar day. Which request retrieves them efficiently?
- A Scan with a FilterExpression matching the timestamp prefix
- A Query on the device key with begins_with on the sort key Correct answer.
- A Query on a global secondary index partitioned by timestamp
- A GetItem using the device id and the day's first timestamp
Explanation
A Query targets one partition key and can restrict the sort key with a condition such as begins_with, so only the matching prefix range is read. This keeps the read efficient and proportional to the day's data.
Question 36Workload-Specific Database Design
Some items in a DynamoDB table carry a 900 KB JSON document, which exceeds the maximum item size. Which design keeps the record retrievable?
- Increase the table's provisioned write capacity to allow larger items
- Compress the document so that it fits under the item size limit
- Keep the document in Amazon S3 and store the key in the item Correct answer.
- Convert the attribute to a binary type, which allows larger items
Explanation
DynamoDB items are capped at 400 KB regardless of attribute type, so large payloads are conventionally stored in Amazon S3 with the object key held as an item attribute. This keeps items small while preserving the full document.
Question 37Workload-Specific Database Design
Two application instances may update the same DynamoDB item concurrently, and lost updates must be prevented without locking the table. Which approach achieves this?
- Use a Scan followed by an unconditional PutItem
- Use a conditional UpdateItem that checks a version attribute Correct answer.
- Enable DynamoDB Streams and reconcile conflicting writes later
- Use a strongly consistent read before each write
Explanation
Optimistic locking stores a version attribute and issues a conditional update that succeeds only if the stored version still matches the one read. A failed condition signals a concurrent change, and the caller retries with fresh data.
Question 38Workload-Specific Database Design
An order write must decrement an inventory item and create the order item, and both changes must succeed or neither. Which DynamoDB capability is required?
- BatchWriteItem with both items in the same request
- A TransactWriteItems call containing both item writes Correct answer.
- A DynamoDB Streams consumer that reverts on failure
- Two PutItem calls wrapped in a retry loop
Explanation
TransactWriteItems groups up to 100 item actions into a single all-or-nothing ACID transaction, optionally with condition checks. This is the only DynamoDB primitive that guarantees atomicity across multiple items.
Question 39Workload-Specific Database Design
A Redshift dashboard runs the same expensive multi-table aggregation every few minutes over slowly changing data. Which feature reduces repeated compute while keeping results current?
- A stored procedure that truncates and reloads a staging table
- A materialized view with automatic refresh Correct answer.
- A late-binding view over the base tables
- A DISTSTYLE ALL copy of the fact table
Explanation
A materialized view stores the precomputed result set and can refresh automatically or on demand, so repeated dashboard queries read the stored result instead of re-running the aggregation. Late-binding views only store the query text.
Question 40Workload-Specific Database Design
A team wants a Redis-compatible, in-memory database that can serve as the durable primary data store with microsecond reads and survive a node failure without losing data. Which service fits?
- Amazon MemoryDB for Redis with a Multi-AZ transactional log Correct answer.
- Amazon ElastiCache for Memcached with multiple nodes
- Amazon DynamoDB Accelerator (DAX) in front of a DynamoDB table
- Amazon ElastiCache for Redis with cluster mode disabled and no replication
Explanation
MemoryDB for Redis is a durable in-memory database that writes to a Multi-AZ transactional log, so data survives node and AZ failures while reads are served from memory in microseconds. ElastiCache is a cache tier and does not provide that durability guarantee.
Question 41Workload-Specific Database Design
Which statement about Amazon DynamoDB local secondary indexes is accurate?
- They can be created with any partition key chosen by the designer
- They have their own provisioned write capacity separate from the base table
- They may be added to an existing table at any time
- They must be created with the table and share its partition key Correct answer.
Explanation
A local secondary index must be defined when the table is created and uses the same partition key as the base table with a different sort key. Because it is stored in the same partition, one partition key's indexed data is limited to 10 GB.
Question 42Workload-Specific Database Design
Query concurrency on a Redshift cluster spikes sharply during business hours and queries queue, although average utilization across the day stays modest. Which feature absorbs the bursts without permanently provisioning peak capacity?
- Redshift concurrency scaling Correct answer.
- Redshift Spectrum external tables
- Redshift cross-Region snapshot copy
- Redshift short query acceleration for every query
Explanation
Concurrency scaling adds transient compute clusters when queues build and removes them when demand falls, billed only for the extra time used. This matches bursty concurrency without sizing for peak permanently.
Question 43Workload-Specific Database Design
A web application's session state must be shared across hundreds of stateless application servers and must expire automatically after a period of inactivity. Which store fits best?
- Amazon DynamoDB Streams with a Lambda consumer
- Amazon ElastiCache for Redis with TTL on session keys Correct answer.
- Amazon RDS for MySQL with a sessions table
- Amazon Redshift with a sessions table
Explanation
ElastiCache for Redis keeps session data in memory for sub-millisecond access across all application servers and expires keys automatically through per-key TTL. This avoids a per-request disk round trip to a relational database.
Question 44Workload-Specific Database Design
A new DynamoDB table will back a product launch whose traffic pattern is completely unknown and highly variable, and throttling must be avoided without manual tuning. Which capacity mode fits?
- On-demand capacity mode Correct answer.
- Provisioned mode with purchased reserved capacity
- Provisioned mode with fixed capacity sized for peak
- Provisioned mode with auto scaling that reacts every 15 minutes
Explanation
On-demand capacity mode automatically accommodates whatever request rate arrives and bills per request, so no capacity planning is needed for unknown workloads. Provisioned modes require a throughput estimate and may throttle before scaling catches up.
Question 45Workload-Specific Database Design
An Aurora MySQL cluster contains replicas of different instance sizes, and reporting queries must be routed only to the two largest replicas. Which feature accomplishes this?
- The cluster's reader endpoint
- A custom endpoint containing only the chosen replicas Correct answer.
- A Route 53 latency alias pointing at each replica
- The cluster's writer endpoint with read splitting
Explanation
An Aurora custom endpoint is a named set of DB instances that you define, and clients connecting to it are load-balanced across only those instances. This isolates a workload from the rest of the cluster's readers.
Question 46Workload-Specific Database Design
A 2 TB Redshift table is distributed with DISTKEY on a column where 80 percent of rows share one value, and one slice is consistently overfull while the others sit idle. Which change addresses the root cause?
- Increase the number of nodes in the cluster to spread the skew
- Add a compound sort key on the skewed column
- Change the table to DISTSTYLE ALL so every node holds a full copy
- Choose a higher-cardinality column that is also used in joins as the DISTKEY Correct answer.
Explanation
Distribution skew occurs when the distribution key has low cardinality, so most rows hash to one slice and that slice becomes the bottleneck for every query. Re-keying on a high-cardinality column used in joins restores even distribution and preserves join colocation.
Question 47Workload-Specific Database Design
A DynamoDB table stores many item types, but only about 2 percent of items are flagged for manual review, and reviewers need a cheap query that returns just those items. Which design minimizes index storage and write cost?
- A local secondary index on the flag attribute
- A full-table scan with a filter expression on the flag
- A global secondary index on a boolean flagged attribute
- A sparse global secondary index whose keys exist only on flagged items Correct answer.
Explanation
A global secondary index is sparse: an item appears in it only if it contains the index's key attributes. Writing those attributes onto flagged items alone yields a small index with no cost for the other 98 percent of items.
Question 48Workload-Specific Database Design
A platform needs ACID transactions with multi-table joins for billing, millisecond key-value access at very high scale for shopping carts, and relevance-ranked full-text search for products. Which combination reflects polyglot persistence?
- A single Aurora cluster serving billing, cart, and search
- DynamoDB for billing, Aurora for carts, Redshift for search
- Aurora for billing, DynamoDB for carts, OpenSearch for search Correct answer.
- Redshift for billing, OpenSearch for carts, Aurora for search
Explanation
Polyglot persistence assigns each access pattern to the engine built for it: a relational engine for transactional joins, a key-value store for high-volume item access, and a search engine for relevance-ranked text. The result is that no workload is forced onto an engine that is poor at it.
Question 49Workload-Specific Database Design
A single logical operation must atomically modify 300 DynamoDB items totalling roughly 2 MB. What is the correct design response?
- Split into two TransactWriteItems calls and retry until both succeed
- Split into chunks of at most 100 items and 4 MB Correct answer.
- Send all 300 items in a single TransactWriteItems call
- Use BatchWriteItem, which applies all 500 items atomically
Explanation
TransactWriteItems accepts at most 100 item actions and 4 MB of data per transaction, so a 300-item atomic unit is not directly expressible. The workload must be re-modelled into smaller transactions or aggregated into fewer, larger items.
Question 50Workload-Specific Database Design
A SaaS platform has thousands of small tenants plus a handful of very large tenants, and the small tenants must not contend with the large ones for database resources. Which tenancy model fits best?
- Pool all tenants in one database sharded only by tenant id
- Give each tenant a dedicated Redshift cluster for analytics
- Give every tenant its own dedicated database for uniform isolation
- Pool small tenants and give large tenants dedicated databases Correct answer.
Explanation
A hybrid model pools many small tenants into shared infrastructure to control cost while isolating very large tenants whose load could dominate shared resources. It balances per-tenant isolation against the operational overhead of one database per tenant.