GOOGLE-PROFESSIONAL-CLOUD-DEVELOPER practice question 31 of 35

Which database should HipLocal use for storing user activity?

Full set: 265 questions
Answer options
A: BigQuery Correct answer
B: Cloud SQL
C: Cloud Spanner
D: Cloud Datastore
Correct Answer:
A. BigQuery
Explanation

User activity data typically consists of a high-volume stream of events that needs to be stored and analyzed to derive business insights. BigQuery is Google Cloud's fully managed, serverless data warehouse designed specifically for large-scale data analytics (OLAP). It excels at ingesting massive datasets, including real-time streams, and running complex analytical SQL queries efficiently. This makes it the ideal choice for storing and analyzing user activity logs, which often grow to petabyte scale.

Why Incorrect

B. Cloud SQL: This is a managed relational database (OLTP) service. It is not designed for the massive scale or analytical query patterns required for user activity logging and would be inefficient and costly.
C. Cloud Spanner: This is a globally distributed, strongly consistent relational database (OLTP). While it offers horizontal scalability, its primary purpose is transactional workloads, not large-scale analytics, making it an incorrect and expensive choice for this use case.
D. Cloud Datastore: This is a NoSQL document database designed for storing application state and transactional data. It is not optimized for the complex, aggregate queries typical of user activity analysis. ---

References

1. Google Cloud Documentation, "What is BigQuery?": "BigQuery is a fully managed enterprise data warehouse that helps you manage and analyze your data... Common use cases for BigQuery include... Real-time analytics. BigQuery can ingest high-speed streaming data to enable real-time analytics of your business operations." This directly aligns with the requirements for analyzing user activity.

2. Google Cloud Blog, "Choosing the right database: Spanner, BigQuery or both?": This article explicitly differentiates the services: "BigQuery is Google Cloud’s data warehouse for analytics (OLAP)... Spanner is Google Cloud’s globally distributed database for transactional workloads (OLTP)." This clarifies that for analytics on event data (like user activity), BigQuery is the appropriate choice over Spanner.

3. Google Cloud Documentation, "Cloud SQL for MySQL - Use cases": The documented use cases include "Web frameworks," "E-commerce applications," and "SaaS applications," all of which are transactional (OLTP) in nature and distinct from the large-scale analytical workload of processing user activity.

4. Google Cloud Documentation, "Cloud Firestore - Use cases": Firestore is recommended for "user profiles and activity feeds," "gaming leaderboards," and "real-time chat apps." This refers to serving live application data, not performing large-scale, historical analysis on the entire dataset, which is BigQuery's domain.

Scroll to Top