Google Professional Cloud Developer Question 405
Single answerGoogle Cloud PlatformYou are developing a serverless application on Google Cloud that requires storing user data in a highly scalable and low-latency datastore. The application also needs to execute complex queries involving multiple filters and sorting across large datasets. Which datastore should you use, and why?
- A
Cloud Firestore
- B
Cloud SQL
- C
Cloud Spanner
- D
Cloud Bigtable
Show answer and explanation
Correct answer: A
Explanation
Cloud Firestore is the best choice for this scenario because it is a fully managed, scalable NoSQL database designed to handle low-latency requirements and complex queries such as filtering and sorting. Other options, like Cloud SQL and Cloud Spanner, are more suited for relational workloads, while Cloud Bigtable lacks the querying flexibility required for this use case.
- A. Correct.
Cloud Firestore is suitable for scalable, low-latency applications that require complex queries with multiple filters and sorting. It is a NoSQL database designed to handle real-time data synchronization and supports rich querying capabilities.
- B. Incorrect.
Cloud SQL is a relational database that is better suited for applications requiring transactional consistency and SQL-based querying. However, it may not handle scalability and low-latency requirements as effectively as Cloud Firestore for NoSQL use cases.
- C. Incorrect.
Cloud Spanner offers strong consistency and horizontal scalability, but it is better suited for global, relational database use cases rather than NoSQL applications with complex queries.
- D. Incorrect.
Cloud Bigtable is optimized for analytical workloads and single-row key lookups but does not support complex querying with filters and sorting, making it less ideal for the given scenario.