Google Professional Data Engineer Question 141
Select 3Google Cloud PlatformYour company is designing a data model for an e-commerce application that tracks user interactions, such as clicks, purchases, and reviews. The data must support both real-time analytics and machine learning model training. Which design principles should you prioritize to ensure scalability and flexibility in your data model?
- A
Use a denormalized schema for real-time analytics to reduce query complexity and improve performance.
- B
Design a schema that allows schema-on-read for machine learning workloads to adapt to evolving data requirements.
- C
Implement highly normalized tables to reduce redundancy and optimize storage.
- D
Avoid using partitioning in your tables to simplify the data model.
- E
Incorporate timestamp fields to support event-based analysis and ordering.
Show answer and explanation
Correct answers: A, B, E
Explanation
Designing a scalable and flexible data model for an e-commerce application requires balancing real-time analytics and machine learning needs. Denormalized schemas optimize performance for analytics, schema-on-read ensures adaptability for machine learning, and timestamp fields enable event-based analysis. Normalized schemas and the lack of partitioning hinder scalability and performance in this use case.
- A. Correct.
Using a denormalized schema for real-time analytics reduces query complexity and improves performance, which is critical for responsive analytics.
- B. Correct.
Schema-on-read allows for flexibility in handling evolving data requirements, which is essential for machine learning workloads that may need to adapt to new data attributes.
- C. Incorrect.
Highly normalized tables are not ideal for this scenario because they can lead to complex queries and may not perform well for analytics or machine learning.
- D. Incorrect.
Avoiding partitioning is not a good practice, as partitioning can significantly improve query performance for large datasets, especially in time-series or event-based data.
- E. Correct.
Including timestamp fields is crucial for event-based analysis, allowing you to analyze trends over time and order events accurately.