Databases and migration: CLF-C02 study notes and practice questions
What to know about Databases and migration for the CLF-C02 exam, from the Cloud Technology and Services domain (34% of the exam guide), then 2 free questions to test it. Part of the CLF-C02 study guide.
A standard SQL database without managing servers, patching or backups
Amazon Aurora
AWS-built relational, MySQL- and PostgreSQL-compatible
Higher performance and availability than standard RDS engines
Amazon DynamoDB
Serverless NoSQL key-value and document
Single-digit millisecond performance at any scale, no servers
Amazon ElastiCache
In-memory cache
Speeding up repeated reads in front of a database
Amazon MemoryDB
Durable in-memory database
Ultra-fast primary database with durability
Amazon Redshift
Data warehouse
Analytics (SQL) over large amounts of data
Amazon DocumentDB
Document database, MongoDB-compatible
MongoDB workloads
Amazon Neptune
Graph database
Highly connected data, such as social networks or fraud detection
Amazon Keyspaces
Apache Cassandra-compatible
Cassandra workloads
Managed vs self-managed
Running a database on EC2 gives full control (any version, any OS setting) but you do the patching, backups and high availability yourself. RDS and the other managed services do that work for you. Choose EC2 only when the scenario needs something a managed service can’t offer.
Migration
AWS Database Migration Service (DMS) moves databases to AWS while the source keeps running, between the same or different engines.
AWS Schema Conversion Tool (SCT) converts the schema when moving between different engines (for example, Oracle to Aurora PostgreSQL).
Common traps
DynamoDB vs RDS. Relational with joins and SQL points to RDS or Aurora; key-value at massive scale points to DynamoDB.
Redshift for transactions. Redshift is for analytics, not for running an online store’s orders.
ElastiCache as the main database. It is a cache in front of one.
An online shop's product pages read the same product data from an Amazon RDS database thousands of times a minute.
The product data changes only a few times a day. The company wants the repeated reads answered from memory, to respond faster and reduce load on the database.
Which change should it make?
Choose one answer.
AA. Add Amazon ElastiCache in front of the database, caching frequent query results
BB. Add an RDS read replica and send all product reads to it
CC. Move the product data to Amazon Redshift, a data warehouse for faster queries
DD. Use AWS Database Migration Service to copy the product data into another database engine
Show the answer and explanation
Answer: A
A. Right: Correct. ElastiCache is a distributed in-memory data store used as a cache. Caching frequent query results answers repeated reads from memory and reduces database load, and rarely changing data stays cached well. Learn more: Caching database query results (opens in a new tab)
B. Wrong: A read replica spreads reads across a second database copy, which helps load. But each read is still answered from database storage rather than from memory, so it misses the in-memory goal.
C. Wrong: Redshift is built for large analytical queries over structured data. It is not an in-memory cache for fast, repeated product reads.
D. Wrong: DMS moves data between databases during a migration or replication. It does not keep frequently read data in memory to speed up responses.
Explanation
ElastiCache is an in-memory data store used as a cache. Placing it in front of RDS answers repeated product reads from memory, which is faster and lightens the load on the database. A read replica still reads from database storage, while Redshift and DMS do other jobs.
A software vendor's application needs a database engine version that Amazon RDS does not offer.
A monitoring agent must also be installed on the database server's operating system. The company wants full control of the server, so it will not use a managed database service.
Which option meets these requirements?
Choose one answer.
AA. Amazon RDS, using the closest available engine version
BB. Amazon Aurora, a managed database with MySQL- and PostgreSQL-compatible engines
CC. Amazon DynamoDB, which needs no database server
DD. Install the database engine on Amazon EC2 instances the company manages
Show the answer and explanation
Answer: D
A. Wrong: Amazon RDS does not offer the required version, so a nearby version fails the first requirement. RDS also manages the host and does not let customers install their own software on its operating system.
B. Wrong: Aurora is a managed service, so the company cannot install its own software on the database server or control the server. It fails the requirement for full control. Learn more: Amazon Aurora (opens in a new tab)
C. Wrong: DynamoDB is a key-value and document database, not a relational engine, so it cannot run the vendor's database software. It also gives no operating system access for the agent.
D. Right: An EC2 instance gives the company access to the operating system, so it can install the agent and choose the engine version. The company then handles patching and backups itself, which it has accepted. Learn more: Amazon EC2 (opens in a new tab)
Explanation
Amazon EC2 gives the company control of the operating system, so it can install the agent and run the engine version it needs. RDS lacks the version and does not allow custom operating system software, Aurora is managed with no server access, and DynamoDB is not a relational engine.
Want more on Databases and migration? The 5 full-length practice sets have 10 more Databases and migration questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →