Google Cloud Professional Cloud Developer — Question 176

You work for an organization that manages an online ecommerce website. Your company plans to expand across the world; however, the estore currently serves one specific region. You need to select a SQL database and configure a schema that will scale as your organization grows. You want to create a table that stores all customer transactions and ensure that the customer (CustomerId) and the transaction (TransactionId) are unique. What should you do?

Answer options

Correct answer: C

Explanation

The correct answer is C because Cloud Spanner is designed to scale horizontally and can handle a larger volume of transactions across multiple regions, making it suitable for a global ecommerce platform. Using a UUID for TransactionId ensures uniqueness without the risk of collisions that may occur with incremental numbers, especially when scaling. The other options either use Cloud SQL, which may not scale as effectively, or suggest using an incremental number for TransactionId, which could lead to issues in a distributed system.