Professional Data EngineerBuilding and operationalizing data processing systemsMedium
A healthcare provider is building a new system to store anonymized patient records. They need a highly available, globally consistent, transactional database that can scale horizontally to handle millions of records and thousands of concurrent read/write operations. Data integrity and strong consistency are paramount. Which Google Cloud database service should they choose?
- ACloud SQL for PostgreSQL
- BFirestore
- CBigQuery
- DCloud Spanner
Show answer & explanationAnswer & explanation
Correct answer: D. Cloud Spanner
Cloud Spanner is a globally distributed, strongly consistent, and highly available relational database service. It offers transactional consistency and horizontal scalability, making it ideal for the described requirements of sensitive patient records.
Why the other options are wrong
- A. Cloud SQL for PostgreSQL offers strong consistency but is not designed for global distribution and horizontal scalability at the scale of 'millions of records and thousands of concurrent operations' without significant sharding challenges.
- B. Firestore is a NoSQL document database, offering eventual consistency and different transaction models, not global strong consistency.
- C. BigQuery is a data warehouse for analytics, not a transactional database for operational patient records.
Google Cloud Spanner
A globally distributed, horizontally scalable, and strongly consistent relational database service, designed for mission-critical applications requiring high availability and transactional consistency.
- Global strong consistency (ACID transactions)
- Horizontal scalability across regions and continents
- High availability with automatic failover
Memory trick: Spanner: Spans the globe with strong transactions.