PROFESSIONAL-CLOUD-DEVELOPER · Question #153
Your company needs a database solution that stores customer purchase history and meets the following requirements: - Customers can query their purchase immediately after submission. - Purchases can be
The correct answer is A. Firestore in Native mode. Firestore in Native mode satisfies all three requirements. First, it provides strong consistency, meaning data is immediately readable after a write - satisfying the 'query immediately after submission' requirement. Second, it supports rich indexing and sorting on multiple fields
Question
Your company needs a database solution that stores customer purchase history and meets the following requirements:
- Customers can query their purchase immediately after submission.
- Purchases can be sorted on a variety of fields.
- Distinct record formats can be stored at the same time.
Which storage option satisfies these requirements?
Options
- AFirestore in Native mode
- BCloud Storage using an object read
- CCloud SQL using a SQL SELECT statement
- DFirestore in Datastore mode using a global query
How the community answered
(41 responses)- A80% (33)
- B12% (5)
- C2% (1)
- D5% (2)
Explanation
Firestore in Native mode satisfies all three requirements. First, it provides strong consistency, meaning data is immediately readable after a write - satisfying the 'query immediately after submission' requirement. Second, it supports rich indexing and sorting on multiple fields. Third, as a NoSQL document database, it supports flexible, schema-less document structures, allowing distinct record formats to coexist in the same collection. Cloud Storage (B) is an object store, not a queryable database. Cloud SQL (C) uses a rigid relational schema, making 'distinct record formats' impractical. Firestore in Datastore mode (D) uses eventual consistency for global queries, meaning reads immediately after a write may not reflect the latest data - violating the first requirement.
Topics
Community Discussion
No community discussion yet for this question.