2.3 Selecting Google Cloud Databases and Storage Services

Key Takeaways

  • Google Cloud offers purpose-built databases matched to specific access patterns: BigQuery for OLAP analytics, Cloud SQL and AlloyDB for traditional relational OLTP, Cloud Spanner for globally scalable ACID transactions, Bigtable for high-throughput wide-column time series, and Firestore for mobile/web document synchronization.

  • Cloud Spanner uses TrueTime atomic clocks to provide external consistency and horizontal scaling across global regions with a 99.999% SLA, overcoming Cloud SQL's 64 TB vertical storage limit.

  • Cloud Bigtable delivers single-digit millisecond latency for massive operational and analytical workloads (>1 TB to petabytes), and depends on careful row-key design; it does not offer multi-row ACID transactions.

  • BigQuery separates compute (slots) from storage (Capacitor) to analyze petabytes of structured and semi-structured data using standard SQL, making it the primary analytical engine for enterprise business intelligence and machine learning.

  • Selecting the correct storage engine requires evaluating data structure (relational, document, wide-column, object), transactional requirements (ACID vs eventual), query complexity, and scalability limits.

Last updated: October 2026

2.3 Selecting Google Cloud Databases and Storage Services

Modern cloud architectures reject the one-size-fits-all database anti-pattern. Google Cloud provides a purpose-built portfolio of storage and database services, each engineered for distinct data structures, scaling characteristics, query languages, and consistency models. As a data practitioner, your responsibility is to match workload characteristics—such as throughput volume, latency SLAs, relational integrity, and access patterns—to the optimal Google Cloud data store.


Definitive Guide to Google Cloud Data Stores

Google Cloud Storage & Database Landscape:

├── Unstructured Object Store
│   └── Cloud Storage (Raw data lakes, staging, media, backups)
│
├── Analytical Data Warehouse (OLAP)
│   └── BigQuery (Serverless SQL analytics at petabyte scale)
│
├── Relational Databases (OLTP / ACID)
│   ├── Cloud SQL (Vertical scale up to 64 TB, MySQL / Postgres / SQL Server)
│   ├── AlloyDB for PostgreSQL (High-performance enterprise HTAP)
│   └── Cloud Spanner (Horizontal scale, global ACID, 99.999% SLA)
│
└── NoSQL Databases
    ├── Cloud Bigtable (High-throughput, wide-column, low-latency time series >1 TB)
    └── Firestore (Serverless document store, mobile/web sync, offline mode)

1. BigQuery: Enterprise Cloud Data Warehouse (OLAP)

BigQuery is Google Cloud's fully managed, serverless enterprise data warehouse designed for petabyte-scale analytical queries.

  • Architecture: Decouples compute and storage completely. Storage is managed by Capacitor (a proprietary columnar format), and compute is provided by Dremel execution engines dynamically allocating processing units called slots. Storage and compute communicate across the Jupiter petabit-scale network.
  • Query Capabilities: Full ANSI:2011 SQL compliance, native support for nested and repeated fields (STRUCT and ARRAY), geospatial analysis (GIS), BigQuery ML for training machine learning models using SQL, and BigQuery Omni for multi-cloud queries across AWS and Azure.
  • Scalability & Limits: Scales elastically to exabytes. It is not designed for row-by-row transactional updates (OLTP) or high-concurrency sub-millisecond point lookups.
  • Best Fit: Business intelligence dashboards, corporate data warehouses, large-scale ad-hoc analytics, and machine learning feature stores.

2. Cloud SQL: Managed Relational Database (OLTP)

Cloud SQL provides fully managed relational database instances running MySQL, PostgreSQL, or Microsoft SQL Server.

  • Architecture: Traditional relational database engine running on managed virtual machine infrastructure with automated patching, backup management, and regional high availability (HA) failover.
  • Scalability & Limits: Cloud SQL is a vertical scaling database. Compute scales vertically by choosing a larger machine type, and storage is capped at 64 TB. Read replicas can scale read throughput, but all transactional writes must route to a single primary instance.
  • Best Fit: Migrating existing on-premises relational databases, traditional enterprise web applications, e-commerce backends under 64 TB, and department-level transactional databases requiring standard SQL compatibility.

3. Cloud Spanner: Globally Distributed Relational Database

Cloud Spanner is Google Cloud's groundbreaking, horizontally scalable, globally distributed relational database service.

  • Architecture: Combines the strict transactional consistency of a relational database with the limitless horizontal scalability of a NoSQL database. Spanner relies on Google's proprietary TrueTime API—a synchronized system of GPS receivers and atomic clocks embedded in every Google data center worldwide. TrueTime provides monotonically increasing timestamps that guarantee external consistency (serializable ACID transactions) without distributed locking bottlenecks.
  • Scalability & Availability: Scales writes and reads horizontally by adding compute nodes. Supports multi-region replication with an industry-leading 99.999% (five nines) availability SLA, guaranteeing less than 5.26 minutes of downtime per year.
  • Best Fit: Mission-critical financial ledgers, global payment gateways, airline reservation systems, and supply chain applications requiring multi-region consistency, zero maintenance downtime, and scale exceeding Cloud SQL limits.

4. AlloyDB for PostgreSQL: Modern Enterprise Database

AlloyDB is a fully managed, PostgreSQL-compatible relational database service designed for demanding enterprise transactional and analytical workloads.

  • Architecture: Disaggregates compute from storage. The storage layer is custom-built, multi-zone, and log-structured, featuring an intelligent, in-memory columnar engine that automatically identifies and accelerates analytical queries without manual ETL.
  • Performance: Delivers up to 4x faster throughput for standard transactional workloads and up to 100x faster analytical query execution compared to standard open-source PostgreSQL.
  • Best Fit: High-performance transactional workloads experiencing bottlenecks on standard PostgreSQL, enterprise database modernization, and hybrid transactional and analytical processing (HTAP).

5. Cloud Bigtable: Low-Latency NoSQL Wide-Column Store

Cloud Bigtable is a sparsely populated, persistent, multidimensional sorted map indexed by row key, column key, and timestamp.

  • Architecture: Separates compute nodes from underlying storage (Colossus). Bigtable tables are dynamically sharded into contiguous ranges of rows called tablets. Adding cluster nodes scales read and write throughput linearly with zero downtime.
  • Performance & Latency: Delivers consistent single-digit millisecond latency (sub-10ms) and can scale to millions of reads and writes per second. Optimized for massive datasets (>1 TB up to petabytes).
  • Limitations: No multi-row ACID transactions. Reads are fastest as row-key lookups and row-key range (prefix) scans; Bigtable also accepts GoogleSQL queries, but they still perform best when they filter on the row key. If the row key is poorly designed, it causes hotspotting (concentrating all traffic on a single node).
  • Best Fit: IoT sensor telemetry, financial market tick streams, user clickstream logging, ad-tech impression tracking, and recommendation engine feature storage.

6. Firestore: Serverless NoSQL Document Store

Firestore is a fully managed, serverless NoSQL document database designed for application development.

  • Architecture: Stores data in flexible, JSON-like documents grouped into collections. Supports subcollections and hierarchical relationships.
  • Capabilities: Built-in client SDKs for web, iOS, Android, and Flutter that feature offline data persistence and real-time snapshot listeners that automatically push data changes to connected devices. Supports multi-document ACID transactions.
  • Operating Modes:
    • Native Mode: Full document features, offline sync, real-time listeners, and strong consistency.
    • Datastore Mode: Backward-compatible with legacy Datastore and aimed at server-side applications; it lacks the mobile and web client SDKs and real-time listeners.
  • Best Fit: Mobile and web application state, user profiles, gaming leaderboards, collaborative real-time apps, and retail catalog management.

7. Cloud Storage: Object Data Lake

Cloud Storage is Google Cloud's unstructured object storage repository. It provides virtually infinite capacity with high durability (11 nines). It serves as the primary landing zone for raw data files before ingestion into BigQuery or processing with Dataproc.


Master Decision Matrix

ServiceWorkload TypeScalability ModelPrimary Query InterfaceConsistency ModelIdeal Best-Fit Scenario
BigQueryOLAP AnalyticsServerless Auto-scale (Exabytes)ANSI:2011 SQLConsistent snapshot per query (analytics, not OLTP)Petabyte-scale enterprise analytics, BI reporting, SQL ML
Cloud SQLRelational OLTPVertical Scale (up to 64 TB)Standard SQL (MySQL, Postgres, SQL Server)Strong ACIDMonolithic web applications, department transactional backends
Cloud SpannerDistributed OLTPHorizontal Scale (Petabytes)ANSI SQL with schemaStrong External Consistency (TrueTime)Global banking, payment gateways, multi-region ACID systems
AlloyDBEnterprise OLTP / HTAPHorizontal Read / Scale StoragePostgreSQL SQLStrong ACIDHigh-throughput PostgreSQL workloads, hybrid transactional/analytical
Cloud BigtableNoSQL Wide-ColumnHorizontal Scale (Petabytes)HBase API / gRPC (Row-Key scan)Single-row Strong ACIDHigh-velocity IoT telemetry, time-series metrics, clickstreams (>1 TB)
FirestoreNoSQL DocumentServerless Auto-scale (Terabytes)Document path / Object queriesStrong Consistency (multi-doc ACID)Mobile/web user profiles, real-time collaborative apps, offline sync
Cloud StorageUnstructured ObjectVirtually InfiniteREST API / gcloud storageStrong Consistency (atomic write/read)Raw data lake staging, audio/video media, backups, Parquet files

Real-World Exam Decision Walkthroughs

Core Architectural Decision Flowchart:

Is the data structured, semi-structured, or unstructured?
├── Unstructured / Files (Images, raw CSV, backups) ─────────> Cloud Storage
├── Relational / SQL Queries Required?
│   ├── Data Warehouse / Analytical Aggregations (OLAP) ─────> BigQuery
│   └── Transactional (OLTP / ACID)?
│       ├── Scale < 64 TB, Single Region, Lift-and-Shift ───> Cloud SQL
│       ├── Demanding PostgreSQL + In-memory Analytics ─────> AlloyDB
│       └── Global scale, Horizontal writes, 99.999% SLA ───> Cloud Spanner
└── NoSQL / Non-Relational?
    ├── Sub-10ms point lookups, IoT/telemetry, > 1 TB ───────> Cloud Bigtable
    └── Mobile/Web App, Offline sync, Hierarchical Docs ────> Firestore

Scenario 1: Cloud SQL vs. Cloud Spanner

  • Scenario: A nationwide retail bank operates its core checking account ledger on Cloud SQL for MySQL. The database is approaching 55 TB. During seasonal shopping peaks, transactional write volume saturates CPU utilization on the largest available machine type, causing transaction timeouts. The bank plans an international expansion across North America and Europe, requiring a database that supports standard SQL, ACID transactions across multiple regions, zero planned downtime, and seamless horizontal write scaling.
  • Decision: Migrate to Cloud Spanner.
  • Rationale: Cloud SQL cannot scale transactional writes horizontally across multiple instances, and its maximum storage capacity is hard-capped at 64 TB. Cloud Spanner is engineered specifically for horizontally scalable relational transactions. Using TrueTime, it provides multi-region synchronous writes, serializable ACID guarantees, and a 99.999% availability SLA with virtually unlimited storage.

Scenario 2: Cloud Bigtable vs. BigQuery

  • Scenario: An automotive manufacturer deploys 2,000,000 connected vehicles that transmit GPS telemetry, battery voltage, and motor diagnostic metrics every second, generating 10 TB of incoming data daily. Field technicians in maintenance garages require a diagnostic tool that retrieves the most recent 100 telemetry records for a specific vehicle identification number (VIN) with response times under 10 milliseconds. Simultaneously, automotive design engineers need to run aggregate SQL queries across 3 years of historical fleet telemetry to analyze battery degradation trends.
  • Decision: Implement a hybrid architecture using both Cloud Bigtable and BigQuery.
  • Rationale: No single service satisfies both requirements. Bigtable is chosen for operational ingest and field lookups because it provides sub-10ms response times for point lookups and row-key scans (VIN#timestamp). However, Bigtable cannot run complex analytical SQL aggregations efficiently. Therefore, telemetry data is simultaneously streamed or batch-loaded from Bigtable/Cloud Storage into BigQuery, where data engineers leverage columnar storage and distributed SQL slots to analyze historical degradation across billions of records.

Scenario 3: Firestore vs. Cloud Bigtable

  • Scenario: A healthcare technology startup is building a patient-facing mobile application for iOS and Android. The app allows patients to log daily nutrition, track medication schedules, and chat with care teams. The application must continue functioning smoothly when patients lose cellular connectivity in remote clinics, cache changes locally on the smartphone, and automatically push synchronized updates to care team dashboards when connectivity is restored.
  • Decision: Select Firestore in Native Mode.
  • Rationale: Firestore is purpose-built for mobile client applications. Its client SDKs provide native offline persistence, local data caching, and real-time snapshot listeners. Cloud Bigtable is a server-side wide-column engine with no mobile client SDKs, no offline caching mechanisms, and high baseline cluster costs that make it inappropriate for mobile document synchronization.
Loading diagram...
Google Cloud Storage and Database Decision Flowchart
Test Your Knowledge

A global retail conglomerate operates a mission-critical transactional order management system. The system requires standard SQL relational querying, strictly serializable ACID transactions across multiple continental regions, and guaranteed 99.999% availability without manual failover. The anticipated database size will expand from 20 TB to over 150 TB in two years. Which Google Cloud database service must be selected?

A

Cloud SQL for PostgreSQL with cross-region read replicas.

B

Spanner configured with a multi-region instance configuration

C

AlloyDB for PostgreSQL with cross-region storage synchronization.

D

Cloud Bigtable with multi-cluster replication across three regions.

Test Your Knowledge

An Internet of Things (IoT) vehicle fleet management platform collects telematics data from 1,000,000 connected trucks. Every 2 seconds, each truck transmits GPS coordinates, engine temperature, and diagnostic codes, totaling over 3 TB of new data per day. Maintenance technicians require a REST API that fetches the most recent status of any specific vehicle by Vehicle Identification Number (VIN) with consistent response times under 10 milliseconds. Which storage engine is best suited for this operational read/write workload?

A

Firestore in Datastore mode, configured with automated composite indexes.

B

BigQuery, using partitioned tables clustered on the Vehicle Identification Number.

C

Cloud Bigtable, with a carefully designed row key such as VIN#timestamp for fast lookups

D

Cloud Storage Standard class, storing each telemetry record as an individual JSON object.

Test Your Knowledge

A team is building a collaborative mobile document editor. The mobile application must support offline editing so users can modify documents on airplanes, automatically synchronize changes to the cloud when network connectivity is restored, and listen to real-time document updates made by team members. Which Google Cloud database should the team choose?

A

Cloud SQL with read replicas

B

Cloud Spanner multi-region

C

Firestore in Native mode

D

Cloud Bigtable with replication

Sections you finish are checked off in the contents.