Databases
Google Cloud databases fall into two families - relational and non-relational (NoSQL) - plus BigQuery for analytics. Match the data shape to the family first, then read the scale and consistency signals to land on one product. Before that, work through how to choose a database - classify the app as transactional or analytical (OLTP leans relational, OLAP leans BigQuery), then weigh the key factors. To pick between them end-to-end, start from the decision chart on the section overview, then see worked scenarios that walk three real applications through the choice.
A relational database is a well-organized library - data neatly categorized into tables like books on shelves, found with SQL as the catalog, with built-in rules keeping everything consistent. A NoSQL database is a bustling marketplace - flexible and dynamic, happy to hold customer reviews, social posts, or IoT sensor readings in whatever shape they arrive, trading strict consistency for throughput and scale. Match the data shape to the room first; the scale signals pick the exact product.
Relational databases
Relational databases store data in tables of rows and columns joined by relationships, with built-in mechanisms to keep the structure consistent. That fixed structure suits applications whose data shape does not change often - e-commerce, banking, social media, and increasingly gen AI. The defining guarantee is that every transaction is ACID.
When a question leans on ACID guarantees, multi-statement transactions, JOINs, or a fixed schema, the answer is a relational database - not a document or wide-column NoSQL store. Match the data shape first, then the scale signals decide which relational product.
Google Cloud offers three relational databases:
-
Cloud SQL - fully managed MySQL, PostgreSQL, and SQL Server. Regional, up to a few dozen TB, automatic backups, failover and read replicas. The default relational answer for standard OLTP web apps - e-commerce, CMS, social networking.
-
AlloyDB - PostgreSQL-compatible, tuned for demanding workloads: up to ~4x faster transactional and up to 100x faster analytical (HTAP) than standard Postgres. Real-time trading, high-volume e-commerce, fraud detection, personalized recommendations.
-
Spanner - globally distributed relational DB with horizontal scaling AND strong external consistency, backed by TrueTime. Always-on (no scale-to-zero), 99.999% multi-region SLA. Global financial systems, supply chain, worldwide gaming, IoT. Blends relational and NoSQL traits - relational schema and SQL with ACID, plus NoSQL-style horizontal scale and global distribution.
Non-relational (NoSQL) databases
NoSQL databases store data as keys and values in a single table, or as documents such as JSON. A query does not have to join several tables, so they are fast and ideal for data that changes frequently or needs high throughput and low latency. They prioritize flexibility and scale over built-in integrity, so the application may have to enforce consistency itself.
-
Firestore - serverless, autoscaling document database with real-time listeners and offline sync for web/mobile; integrates with Firebase. Strong consistency, scales to zero when idle. Chat apps, social feeds, collaborative editing. (Datastore mode is the legacy/server API.)
-
Bigtable - petabyte-scale wide-column NoSQL for high-throughput, low-latency single-key reads/writes; powers Google Search, Maps, and Gmail. Write-heavy IoT, sensor networks, connected-car telemetry, ad serving. No SQL, no joins, no transactions across rows.
Need a cache in front of a database? That is Memorystore - an in-memory Redis/Memcached store. It is volatile (not durable), so it lives under Storage, not here.
Analytics
BigQuery - serverless analytics data warehouse. SQL over petabytes, separates storage from compute, pay per query (or slots). Not for transactional single-row workloads.
Building a generative AI app? See Generative AI workloads for vector search and embedding selection.
Spanner and Bigtable bill for provisioned capacity (nodes) even when idle - not a fit for small or intermittent workloads. If the question stresses "cost-effective for a small/spiky workload", they're wrong answers; lean Cloud SQL, Firestore, or BigQuery.
Recap
| Product | Model | Scope | Scales to zero? |
|---|---|---|---|
| Relational | Regional | No | |
| Relational | Global / multi-region | No | |
| Relational (Postgres) | Regional | No | |
| Document | Multi-region | Yes | |
| Wide-column | Regional (zonal clusters) | No | |
| Analytical | Multi-region | Yes (serverless) |