AWS Certified Database – Specialty — Question 222
A database specialist is designing the database for a software-as-a-service (SaaS) version of an employee information application. In the current architecture, the change history of employee records is stored in a single table in an Amazon RDS for Oracle database. Triggers on the employee table populate the history table with historical records.
This architecture has two major challenges. First, there is no way to guarantee that the records have not been changed in the history table. Second, queries on the history table are slow because of the large size of the table and the need to run the queries against a large subset of data in the table.
The database specialist must design a solution that prevents modification of the historical records. The solution also must maximize the speed of the queries.
Which solution will meet these requirements?
Answer options
- A. Migrate the current solution to an Amazon DynamoDB table. Use DynamoDB Streams to keep track of changes. Use DynamoDB Accelerator (DAX) to improve query performance.
- B. Write employee record history to Amazon Quantum Ledger Database (Amazon QLDB) for historical records and to an Amazon OpenSearch Service (Amazon Elasticsearch Service) domain for queries.
- C. Use Amazon Aurora PostgreSQL to store employee record history in a single table. Use Aurora Auto Scaling to provision more capacity.
- D. Build a solution that uses an Amazon Redshift cluster for historical records. Query the Redshift cluster directly as needed.
Correct answer: B
Explanation
Option B is correct because Amazon QLDB provides an immutable ledger, ensuring that historical records cannot be modified, while Amazon OpenSearch Service allows for efficient querying of this data. The other options either do not provide the required immutability (A, C, D) or do not effectively enhance query performance compared to the combination of QLDB and OpenSearch.