Google Cloud Professional Cloud Developer — Question 163
You are building a mobile application that will store hierarchical data structures in a database. The application will enable users working offline to sync changes when they are back online. A backend service will enrich the data in the database using a service account. The application is expected to be very popular and needs to scale seamlessly and securely. Which database and IAM role should you use?
Answer options
- A. Use Cloud SQL, and assign the roles/cloudsql.editor role to the service account.
- B. Use Bigtable, and assign the roles/bigtable.viewer role to the service account.
- C. Use Firestore in Native mode and assign the roles/datastore.user role to the service account.
- D. Use Firestore in Datastore mode and assign the roles/datastore.viewer role to the service account.
Correct answer: C
Explanation
The correct answer is C because Firestore in Native mode is designed to handle hierarchical data structures effectively and supports offline capabilities with seamless synchronization. The assigned role, roles/datastore.user, grants the necessary permissions for data manipulation, while the other options do not provide the same level of support for both hierarchical data and offline functionality.