Google Professional Data Engineer Question 130
Single answerGoogle Cloud PlatformYour organization is building a high-traffic e-commerce application that requires globally consistent transactions and horizontal scalability for inventory management. The application must ensure low-latency performance for users across multiple regions. Which managed database service should you choose?
- A
Cloud Spanner
- B
Cloud SQL
- C
Firestore
- D
Bigtable
Show answer and explanation
Correct answer: A
Explanation
Cloud Spanner is the best choice for this use case because it uniquely combines global consistency, horizontal scalability, and low-latency performance. These features are essential for an e-commerce application that requires accurate, real-time inventory management across multiple regions. Other services like Cloud SQL, Firestore, and Bigtable lack the required combination of scalability, consistency, and global distribution.
- A. Correct.
Cloud Spanner is a globally distributed, horizontally scalable, and strongly consistent database. It is designed to handle high-traffic applications with global consistency and low latency, making it the ideal choice for this scenario.
- B. Incorrect.
Cloud SQL is a managed relational database service, but it is not designed for horizontal scalability or global consistency. It is better suited for traditional transactional workloads with smaller scalability requirements.
- C. Incorrect.
Firestore is a NoSQL document database optimized for mobile and web applications. While it offers scalability, it is not designed for global consistency and transactional integrity at the level required by an e-commerce inventory system.
- D. Incorrect.
Bigtable is a NoSQL wide-column database designed for low-latency analytics and operational workloads. However, it does not provide strong consistency or transactional integrity, making it unsuitable for managing inventory in an e-commerce application.