Google Professional Data Engineer Question 143
Single answerGoogle Cloud PlatformYou are designing a data model for an e-commerce application on Google Cloud. The application needs to store user purchase data, including information about products purchased, purchase timestamps, and user details. The data will be used for both real-time analytics and periodic batch processing. Which storage design would best meet these requirements?
- A
Store all the data in a single BigQuery table with denormalized fields for users and products.
- B
Use Cloud SQL to store normalized tables for users, products, and purchases.
- C
Store the data in Bigtable, with user IDs as row keys and purchase details as column families.
- D
Use Firestore to store hierarchical JSON-like documents for users and their purchase history.
Show answer and explanation
Correct answer: A
Explanation
BigQuery is the best choice for this scenario because it is designed for analytical workloads involving large datasets. A denormalized schema in BigQuery improves query performance and simplifies data processing for both real-time analytics and batch processing. The other options are more suited for transactional or specific use cases that do not align with the requirements described.
- A. Correct.
Storing data in a single BigQuery table with denormalized fields is ideal for analytical workloads. It enables fast query performance for real-time analytics and is well-suited for batch processing.
- B. Incorrect.
While Cloud SQL supports normalized schema designs, it is not optimized for large-scale analytical queries or real-time analytics, which are critical requirements in this scenario.
- C. Incorrect.
Bigtable is suitable for low-latency lookups and large-scale time-series data. However, it lacks the ability to efficiently handle complex analytical queries needed for this use case.
- D. Incorrect.
Firestore is designed for hierarchical and transactional data, but it is not optimized for analytical workloads and might not perform well for large-scale real-time analytics or batch processing.