Google Cloud Professional Data Engineer — Question 300
You work for a large bank that operates in locations throughout North America. You are setting up a data storage system that will handle bank account transactions. You require ACID compliance and the ability to access data with SQL. Which solution is appropriate?
Answer options
- A. Store transaction data in Cloud Spanner. Enable stale reads to reduce latency.
- B. Store transaction in Cloud Spanner. Use locking read-write transactions.
- C. Store transaction data in BigQuery. Disabled the query cache to ensure consistency.
- D. Store transaction data in Cloud SQL. Use a federated query BigQuery for analysis.
Correct answer: B
Explanation
The correct answer is B, as using locking read-write transactions in Cloud Spanner ensures ACID compliance while allowing SQL access. Option A is incorrect because enabling stale reads compromises data consistency. Option C is inappropriate since BigQuery is not designed for transactional workloads requiring ACID compliance. Option D is also not ideal, as Cloud SQL does not provide the same level of scalability as Spanner for high transaction volumes.