Professional Data EngineerBuilding and operationalizing data processing systemsMedium
A media streaming service is migrating its on-premises user activity database to Google Cloud. The database contains millions of user profiles and preferences, requiring low-latency reads and writes for real-time personalization features. The data schema is highly flexible and subject to frequent changes as new personalization features are introduced. Which Google Cloud database service is the most appropriate choice for this migration?
- ACloud Spanner
- BFirestore
- CCloud SQL
- DBigQuery
Show answer & explanationAnswer & explanation
Correct answer: B. Firestore
Firestore is a NoSQL document database designed for flexible, scalable, and low-latency access to data, particularly well-suited for mobile, web, and IoT applications requiring real-time synchronization and flexible schemas. Its document model accommodates schema changes easily, and its real-time capabilities are ideal for personalization features.
Why the other options are wrong
- A. Cloud Spanner offers global consistency and high availability for relational data, but its strong relational schema is less suitable for frequently changing, flexible schemas.
- C. Cloud SQL is a relational database, which is not ideal for highly flexible schemas and real-time synchronization needs of personalization features.
- D. BigQuery is an analytical data warehouse, optimized for large-scale batch queries, not for low-latency transactional reads/writes or real-time personalization.
Firestore
A flexible, scalable NoSQL document database for mobile, web, and server development, offering real-time data synchronization.
- NoSQL document-oriented
- Real-time data synchronization
- Flexible schema and highly scalable
Memory trick: Database choice: Schema flexibility and access speed guide the way.