
Answer-first summary for fast verification
Answer: Use Firestore in Native mode and assign the roles/datastore.user role to the service account.
Firestore in Native mode is the best choice for a mobile application that requires hierarchical data storage, offline synchronization, and seamless scaling. It is specifically designed to handle such requirements efficiently. The roles/datastore.user role is appropriate for the service account as it provides the necessary permissions to read and write data, which is essential for enriching the data in the database. Other options do not meet the application's needs as effectively: Cloud SQL is more suited for relational data and lacks native offline sync capabilities; Bigtable is optimized for large-scale analytics rather than hierarchical data structures or offline access; and Firestore in Datastore mode, while similar, uses an older architecture and the roles/datastore.viewer role does not provide the write access required for data enrichment.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are developing a mobile app that stores hierarchical data in a database, allowing offline users to sync changes upon reconnecting. A backend service will enhance this data using a service account. The app must scale securely and seamlessly due to anticipated high demand. Which database and IAM role should you choose?
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.
No comments yet.