exam questions

Exam Professional Data Engineer All Questions

View all questions & answers for the Professional Data Engineer exam

Exam Professional Data Engineer topic 1 question 165 discussion

Actual exam question from Google's Professional Data Engineer
Question #: 165
Topic #: 1
[All Professional Data Engineer Questions]

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?

  • 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.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
devaid
Highly Voted 2 years, 1 month ago
Selected Answer: B
I'd say B as the documentation primarily says ACID compliance for Spanner, not Cloud SQL. https://cloud.google.com/blog/topics/developers-practitioners/your-google-cloud-database-options-explained Also, spanner supports read-write transactions for use cases, as handling bank transactions: https://cloud.google.com/spanner/docs/transactions#read-write_transactions
upvoted 12 times
AzureDP900
1 year, 10 months ago
B is right
upvoted 1 times
...
Jay_Krish
1 year, 11 months ago
I wonder if you understood the meaning of ACID. This is an inherent property of any relational DB. Cloud SQL is fully ACID complaint
upvoted 14 times
...
...
juliobs
Highly Voted 1 year, 7 months ago
Selected Answer: B
"locations throughout North America" implies multi-region (northamerica-northeast1, us-central1, us-south1, us-west4, us-east5, etc.) Cloud SQL can only do read replicas in other regions.
upvoted 11 times
FP77
1 year, 2 months ago
Read replicas are enough to make Cloud SQL work as a multi-region service. That's not the point. The point is that the answer introduces the use of Bigquery when it's not needed for the use case. That's why B is right.
upvoted 4 times
...
...
MaxNRG
Most Recent 10 months, 2 weeks ago
Selected Answer: B
B. Store transaction in Cloud Spanner. Use locking read-write transactions. Since the banking transaction system requires ACID compliance and SQL access to the data, Cloud Spanner is the most appropriate solution. Unlike Cloud SQL, Cloud Spanner natively provides ACID transactions and horizontal scalability. Enabling stale reads in Spanner (option A) would reduce data consistency, violating the ACID compliance requirement of banking transactions. BigQuery (option C) does not natively support ACID transactions or SQL writes which are necessary for a banking transactions system. Cloud SQL (option D) provides ACID compliance but does not scale horizontally like Cloud Spanner can to handle large transaction volumes. By using Cloud Spanner and specifically locking read-write transactions, ACID compliance is ensured while providing fast, horizontally scalable SQL processing of banking transactions.
upvoted 4 times
...
Aman47
10 months, 3 weeks ago
Selected Answer: B
Spanner is an enterprise level resource which Banks require, Cloud SQL is limited to 30TB of storage. And Banking transactions should be read write locked.
upvoted 1 times
...
barnac1es
1 year, 1 month ago
Selected Answer: B
ACID Compliance: Cloud Spanner is a globally distributed, strongly consistent database service that offers ACID compliance, making it a suitable choice for handling bank account transactions where data consistency and integrity are crucial. SQL Access: Cloud Spanner supports SQL queries, which align with your requirement to access data with SQL. You can use standard SQL to interact with the data stored in Cloud Spanner. Locking Read-Write Transactions: Cloud Spanner allows you to perform locking read-write transactions, ensuring that transactions are executed in a serializable and consistent manner. This is essential for financial transactions to prevent conflicts and maintain data integrity.
upvoted 3 times
...
NeoNitin
1 year, 3 months ago
B. Store transaction data in Cloud Spanner. Use locking read-write transactions. Here's why: ACID Compliance: ACID stands for Atomicity, Consistency, Isolation, and Durability. Cloud Spanner is a fully managed, globally distributed database that provides strong consistency and ACID compliance. This ensures that bank account transactions are processed reliably and accurately, avoiding issues like data corruption or incomplete transactions. Ability to access data with SQL: Cloud Spanner supports SQL, which allows you to perform standard SQL queries on the data. This means that you can use familiar SQL commands to access, retrieve, and manipulate transaction data easily.
upvoted 1 times
...
Adswerve
1 year, 6 months ago
Selected Answer: D
I initially selected B. However, it might be D. https://cloud.google.com/blog/topics/developers-practitioners/your-google-cloud-database-options-explained Cloud Spanner: Cloud Spanner is an enterprise-grade, globally-distributed, and strongly-consistent database that offers up to 99.999% availability, built specifically to combine the benefits of relational database structure with non-relational horizontal scale. It is a unique database that combines ACID transactions, SQL queries, and relational structure with the scalability that you typically associate with non-relational or NoSQL databases. As a result, Spanner is best used for applications such as gaming, payment solutions, global financial ledgers, retail banking and inventory management that require ability to scale limitlessly with strong-consistency and high-availability.
upvoted 1 times
...
musumusu
1 year, 8 months ago
Answer B: locking read-write = for data accuracy state read = for speed up or latency
upvoted 2 times
...
musumusu
1 year, 8 months ago
Answer B: Spanner It's incomplete question, what do you assume by large bank, until we are not sure about size and scale. Region is north america, that can be managed by cloud sql. but i am going for spanner, as its large bank and transaction data.
upvoted 2 times
...
cajica
1 year, 9 months ago
This is definitely a tricky question because both B and D are "appropriate" as the question suggests, of course we can make assumptions with the "large bank" sentence but there are other questions here where making assumptions is not accepted by the community so I wonder when can we make assumptions and when we can't. I think the real problem here is the ambiguous question. This is one of the few questions where the community accept that both (B and D) answers are appropriate but some comments (and I agree) argue the BEST approach is B. I really think some questions can be written in a better and non-ambiguous way, it's just about thinking a little bit more and not conforming when a poor spelling.
upvoted 5 times
...
jkhong
1 year, 10 months ago
Selected Answer: B
The question is hinting a requirement for global consistency, i.e. being available for NA region, which does not just include US but also Mexico, Argentina etc. Large bank = priority over consistency over read-write
upvoted 6 times
ckanaar
1 year, 1 month ago
Good catch, definetely Spanner in that case.
upvoted 1 times
...
desertlotus1211
1 year, 9 months ago
Argentina is South America...
upvoted 5 times
...
...
NicolasN
1 year, 11 months ago
Selected Answer: B
Finally, it's [B]. There is no measurable requirement that rules out [D] (Cloud SQL) and this fact made me to select it as a preferrable answer. But since we are talking about a large bank (which normally implies massive reads/writes per sec.) and nobody has posed any cost limitation, in a real case I would definitely prefer the advantages of Spanner.
upvoted 1 times
...
zellck
1 year, 11 months ago
Selected Answer: B
B is the answer. https://cloud.google.com/spanner/docs/transactions Spanner supports these transaction modes: - Locking read-write. This type of transaction is the only transaction type that supports writing data into Spanner. These transactions rely on pessimistic locking and, if necessary, two-phase commit. Locking read-write transactions may abort, requiring the application to retry.
upvoted 3 times
...
NicolasN
1 year, 12 months ago
Selected Answer: D
[A] No - Stale reads not accepted for bank account transactions. "A stale read is read at a timestamp in the past. If your application is latency sensitive but tolerant of stale data, then stale reads can provide performance benefits." [B] Yes - Fulfills all requirements [C] No - BigQuery is ACID-compliant, but it is too much to use it for such a case (mainly a CRUD app) [D] Yes+ - Fulfills all requirements. The BigQuery part may seem redundant, but it states a true fact that doesn't violate the "access data with SQL" requirement. So, when SQL Cloud and SQL Spanner fit both, there is no reason to prefer the second. And the question doesn't mention any obvious fact for which should we prefer the expensive SQL Spanner: - We don't know if we have to deal with a big amount of data and thousands of writes per second. - We don't know the database size. - There is no need for multi-regional writes that would exclude SQL Cloud as an alternative. Is it a coincidence that the question limits the problem to the single region of North America?
upvoted 2 times
SuperVee
1 year, 8 months ago
Also, correct me if I am wrong, Bigquery cannot query Cloud SQL directly, only when Cloud SQL is exported into GCS, then BQ can connect to GCS using federated queries.
upvoted 1 times
...
zellck
1 year, 11 months ago
North America has many regions, and the requirement is throughout North America, so Cloud Spanner will be more suitable to support multi-regions.
upvoted 3 times
NicolasN
1 year, 11 months ago
You are correct of course. The final sentence was totally inaccurate.
upvoted 2 times
...
...
NicolasN
1 year, 11 months ago
I changed my mind to [B] since I underestimated the given of a "large bank" where the cost difference for a single region Spanner wouldn't matter.
upvoted 1 times
...
...
cloudmon
1 year, 12 months ago
Selected Answer: B
I'd go for B. The only other somewhat valid option is D, but there's no requirement for analytics in the question.
upvoted 1 times
...
mattab1627
2 years ago
Surely its B, transactional data at a large US based bank would surely be massive in size and probably too much for CloudSQL? There is also no mention of a requirement for analytics
upvoted 1 times
...
MounicaN
2 years, 1 month ago
why not spanner?
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago