Choosing Serverless Database for Scalable POS Transactions on GCP

PDE By islever Editorial Last updated

Selecting storage systems. Optimizing resources.

Short answer

D Cloud Datastore is the appropriate choice because it provides automatic, serverless scaling for transactional data without requiring manual infrastructure management, unlike Cloud SQL which needs instance scaling.

Question

You want to process payment transactions in a point-of-sale application that will run on Google Cloud Platform. Your user base could grow exponentially, but you
do not want to manage infrastructure scaling.
Which Google database service should you use?
  1. Cloud SQL
  2. BigQuery
  3. Cloud Bigtable
  4. Cloud Datastore Correct Answer

Key Takeaways

The main trap is confusing 'managed' with 'serverless'. Cloud SQL is managed but requires manual scaling of instances, whereas Cloud Datastore is fully serverless and auto-scales transparently.

Learn why Cloud Datastore is the correct Google Cloud service for scalable, serverless payment transaction processing in POS applications, avoiding manual infrastructure scaling.

Common mistake: A. Cloud SQL: Candidates often choose this because it supports standard SQL and ACID transactions, which are important for payments. However, Cloud SQL is not serverless; you must manage instance sizes and read replicas as traffic grows, violating the 'no infrastructure scaling management' constraint.

Expert Analysis

The question specifies a point-of-sale (POS) application processing payment transactions with a user base capable of exponential growth, while explicitly requiring that the solution does not involve managing infrastructure scaling. This scenario highlights the distinction between managed services and serverless database offerings within Google Cloud Platform.

Cloud Datastore (now part of Firestore in Datastore mode) is a fully managed, NoSQL document database designed for automatic horizontal scaling. It is serverless, meaning it handles storage and compute scaling automatically without manual intervention, fitting the "do not want to manage infrastructure scaling" constraint perfectly. While Cloud SQL is a managed relational database, it requires manual vertical scaling or read replica management as load increases, which contradicts the requirement to avoid managing scaling infrastructure. BigQuery is an analytical data warehouse, unsuitable for low-latency OLTP transaction processing. Cloud Bigtable, while scalable, is optimized for high-throughput analytics and IoT rather than complex transactional ACID operations typical of POS systems.

Comments indicate significant confusion between Cloud SQL and Cloud Datastore. Some argue for Cloud SQL due to its relational nature and strong consistency for transactions. However, the key differentiator here is the scalability model: Cloud SQL is managed but not serverless in terms of compute scaling (you manage instances/replicas), whereas Cloud Datastore is truly serverless and auto-scales seamlessly. Another comment mentions Cloud Spanner, which is also a valid serverless relational option, but it is not listed in the options. Among the choices, Cloud Datastore best fits the serverless, auto-scaling requirement for transactional workloads.

Official Reference

Exam Strategy

When a question emphasizes 'no infrastructure management' or 'automatic scaling' alongside a specific workload type, prioritize serverless NoSQL options like Cloud Datastore/Firestore or Spanner over traditional managed RDBMS like Cloud SQL. Remember that 'managed' does not equal 'serverless'; managed services often still require capacity planning.

Frequently Asked Questions

Is Cloud Datastore suitable for financial transactions?

Yes, Cloud Datastore (Firestore in Datastore mode) supports ACID transactions across multiple entities within a single entity group, making it suitable for many transactional use cases including payments.

Why not Cloud SQL for a POS system?

While Cloud SQL supports SQL and ACID transactions, it is not fully serverless. You must manually scale CPU, memory, and storage, or add read replicas, which violates the requirement to avoid managing infrastructure scaling.

What is the difference between Cloud Datastore and Cloud Spanner?

Both are serverless and scalable. Cloud Spanner offers global consistency and relational schema, while Cloud Datastore is a NoSQL document store. If Spanner were an option, it might be preferred for complex relational transactions, but among the choices, Datastore fits the serverless criteria.

More PDE FAQ →

Community Votes

D
53%
A
33%
C
14%

53% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 150 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 30 of 150

  1. DeepakKhattar 👍 78
    Initially, thinking D is the best answer but when question is re-re-read, A seems to be correct answer for following reasons 1. Is payment TRANSACTION -- DB should able to perform full blown transaction (updating inventory, sales info etc, though not specified) , not just ATOMIC which DataStore provides 2. Its point-of-sale application, not ONLINE STORE where HIGH number of concurrent users ordering stuff. 3. User Base could grow exponentially - again more users does mot mean concurrent users and more processing power. Its only about storage. 4. Do not want to Manage infrastructure scaling. - Cloud SQL can scale in terms of storage. 5. CloudStore is poor selection for OLTP application - Each property is index - so higher latency Not sure, during exam 2 min is enough to think on various point.. I may be wrong or wrong path ... lets brainstrom..
  2. jvg637 👍 38
    D seems to be the right one. Cloud SQL doesn't automatically scale
  3. Radhika7983 👍 14
    D seems to be the answer. This is what I think based on my analysis below. POS is OLTP system but now a days NOSQL with ACID properties also are used for OLTP, Cloud sql is good for relational database and it would have been an option here but it clearly says that "you do not want to manage infrastructure scaling". In cloud SQL, which is managed service and not server less, you need to manually do vertical scaling(scale up and scale down). Hence I believe CLOUD SQL is not the option here. I also tried creating a datastore using google cloud console and it gives 2 options now that is cloud firestore in native mode and cloud firestore in data store mode. automatic scaling is available in both where there is no manual scaling up or down is required. Also, both firestore in native and datastore provides ACID properties. Also, firestore is now optimized for OLTP. Please see below https://cloud.google.com/solutions/building-scalable-apps-with-cloud-firestore Though the question only talks about datastore, I am just providing additional information. Considering all what I read through, D is the answer.
  4. canon123 👍 11
    CloudSql does not auto scale.
  5. Chelseajcole 👍 8
    D. Looking at doc from Google: What it's good for Datastore is ideal for applications that rely on highly available structured data at scale. You can use Datastore to store and query all of the following types of data: Product catalogs that provide real-time inventory and product details for a retailer. User profiles that deliver a customized experience based on the user’s past activities and preferences. Transactions based on ACID properties, for example, transferring funds from one bank account to another. https://cloud.google.com/datastore/docs/concepts/overview#what_its_good_for This payment and can be similar to a banking transactions...so D seems good for this use case
Show 25 more comments
  1. fire558787 👍 7
    Very much Disagree with those saying A is right. D is right: Datastore / Firestore are for transactional workloads and can autoscale. A is wrong as Cloud SQL doesn't scale ("grow exponentially" is the hint). BigQuery can autoscale but is not a transactional DB. BigTable can scale only manually and is not a transactional database (but an analytical database https://cloud.google.com/architecture/data-lifecycle-cloud-platform#managed_wide-column_nosql)
  2. retep007 👍 7
    D - the question is even example use-case mentioned here https://cloud.google.com/datastore/docs/concepts/transactions#uses_for_transactions
  3. hendrixlives 👍 6
    Storage scale is automatic (e.g. you begin with a 50GB disk and it grows automatically as needed), but the instance size (CPU/memory) will be the same. The questions states that the user base may increase exponentially. Even if you have enough disk space to store all your user data, the increase in users will cause problems if your instance (CPU/memory) is too small, since the instance will not be able to process all the queries at the required speed.
  4. anton_royce 👍 5
    I think is is A as this is payment transaction https://cloud.google.com/datastore/docs/concepts/overview Datastore is not ideal for every use case. For example, Datastore is not a relational database, and it is not an effective solution for analytic data. Here are some common scenarios where you should probably consider an alternative to Datastore: If you need a relational database with full SQL support for an online transaction processing (OLTP) system, consider Cloud SQL.
  5. MaxNRG 👍 5
    D as the payment transactions would need a transactional data service Datastore can support the same. Also, it is fully managed with NoOps required. A is wrong as Cloud SQL would need infrastructure scaling. Although storage can be automatically scaled (up to a limit), instance type needs to be changed as per the load manually. B is wrong as BigQuery is a data warehousing option. C is wrong as Bigtable is not a relational database but a NoSQL option.
  6. permoon 👍 5 Answered A
    I' asked ChatGPT about this question, and it told me the correct answer is A. If you want to process payment transactions in a point-of-sale application that will run on Google Cloud Platform and you don't want to worry about managing infrastructure scaling, you should use Google Cloud SQL. Cloud SQL is a fully-managed database service that makes it easy to set up, maintain, manage, and administer your relational databases on Google Cloud Platform.
  7. atnafu2020 👍 5
    Transactions based on ACID properties, for example, transferring funds from one bank account to another. For me, D is the correct answer. How about scalability? if the user growth exponentially scalable, that will force to use spanner :) i think
  8. YashwantKumar1402 👍 5
    Data store is not meant for transactional data. Cloud spanner would have been a good option but in this case cloud sql seems right.
  9. Blobby 👍 5
    Based on a re-read of the above comments and other later questions agree with A. pls ignore my first answer.
  10. Nidie 👍 5
    D.https://cloud.google.com/datastore/docs/concepts/overview
  11. Yonghai 👍 5
    Bigtable
  12. hendrixlives 👍 4 Answered D
    D is correct: Datastore (currently Firestore in native or datastore mode). It is a fully managed and serverless solution that allows for transactions and will autoscale (storage and compute) without the need to manage any infrastructure. A is wrong: Cloud SQL is fully a managed transactional DB, but only the storage grows automatically. As your user base increases, you will need to increase the CPU/memory of the instance, and to do that you must edit the instance manually (and the questions specifically says "you do not want to manage infrastructure scaling") B is wrong: Bigquery is OLAP (for analytics). NoOps, fully managed, autoscales and allows transactions, but it is not designed for this use case. C is wrong: Bigtable is a NoSQL database for massive writes, and to scale (storage and CPU) you must add nodes, so it is completely out of this use case.
  13. Arkon88 👍 4 Answered D
    1) Scaling and transactions are in Datastore 2) here question tells about application so additional point for Datastore 3) answer A looks very good but there scaling is limited and could spanner is not here so D, after reading all info from commets please reffer https://cloud.google.com/datastore/docs/concepts/overview 1)Transactions based on ACID properties, for example, transferring funds from one bank account to another. 2)Massive scalability with high performance
  14. GCP_PDE_AG 👍 4
    A seems to be correct. Usecase here is "process payment transactions in a point-of-sale application". So this is OLTP. Datastore is not a relational database, and it is not an effective solution for analytic data. If you need a relational database with full SQL support for an online transaction processing (OLTP) system, consider Cloud SQL. https://cloud.google.com/datastore/docs/concepts/overview
  15. techtitan 👍 4 Answered D
    Datastore is a highly scalable NoSQL database for your applications. Datastore automatically handles sharding and replication, providing you with a highly available and durable database that scales automatically to handle your applications' load. Datastore provides a myriad of capabilities such as ACID transactions, SQL-like queries, indexes, and much more.
  16. hendrixlives 👍 4
    That link explains how to set MySQL autoscaling with Google Compute Engine instances (you install and manage MySQL on the VM). This can not be applied to Cloud SQL (managed service). In Cloud SQL, only the storage can be automatically increased, and changing the Cloud SQL instance size requires a manual edit of the instance type.
  17. nkunwar 👍 4 Answered D
    As user base grows, write transaction grows since we are dealing with POS (that not the place for reading but writing). In order to accommodate more writes in transactional flavor which can be horizontally scalable DATASTORE should be preferred.
  18. pankajk0811 👍 4
    This is a payment transaction application so it must support ACID backend and DataStore does support this feature along with Great scalability and high performance so I will go with Datastore.
  19. SonuKhan1 👍 4
    D: Datastore does autoscaling whereas Cloud SQL does not scale automatically https://cloud.google.com/datastore/docs/concepts/overview
  20. paauul 👍 4
    This question is from over 2y ago, today it'd probably ask about Spanner. I highly doubt that you'd see this question in the exam
  21. mikey007 👍 4
    D is correct ans.. Below link is from gcp docs where google itself unchecked for Scale insurance for Cloud SQL.
  22. sumanshu 👍 4
    Vote for 'D' https://cloud.google.com/datastore/docs/concepts/overview check the 'What it's good for' section
  23. Asheesh1909 👍 4 Answered D
    Datastore can autoscale and supports transactions, in case of exponential increase in sales too.
  24. GauravGCP 👍 4
    A seems to be more appropriate https://cloud.google.com/products/databases
  25. GCPSharon 👍 4 Answered D
    "infrastructure scaling"! Cloud SQL only can provide auto storage sacle.

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

← Back to PDE Study Guide