Professional Data EngineerDesigning data processing systemsEasy
A startup is building a new mobile application that requires a database to store user preferences and application state. This database needs to offer real-time synchronization across devices, scale effortlessly with user growth, and support flexible, schema-less data structures. The startup aims to minimize operational overhead and prefers a serverless solution. Which Google Cloud database service is the most suitable choice?
- ACloud SQL
- BCloud Spanner
- CBigQuery
- DFirestore
Show answer & explanationAnswer & explanation
Correct answer: D. Firestore
Firestore is a NoSQL document database designed for mobile, web, and serverless applications. It offers real-time synchronization, scales automatically, supports flexible data structures, and is fully managed and serverless, directly meeting all the requirements for user preferences and application state in a mobile app.
Why the other options are wrong
- A. Cloud SQL is a relational database and does not offer real-time synchronization or flexible schema-less data structures required for this mobile application use case.
- B. Cloud Spanner is a globally distributed relational database with strong consistency, but it's typically overkill and too expensive for simple user preferences and application state, and not schema-less.
- C. BigQuery is a data warehouse for analytics, not an operational database for real-time application data with user preferences and application state.
Firestore
Cloud Firestore is a flexible, scalable NoSQL document database for mobile, web, and server development. It offers real-time synchronization and offline support, making it ideal for application state and user data.
- NoSQL document model, flexible schema.
- Real-time synchronization for connected clients.
- Serverless and scales automatically.
- Offline support for mobile and web applications.
Memory trick: Firestore for Fast App Data.