When would you use BigQuery versus Bigtable, Spanner, or Cloud SQL?

Quick Overview

Compare BigQuery, Bigtable, Spanner and Cloud SQL and decide which one fits a given workload. It tests reasoning about analytical versus transactional access patterns, data models, consistency guarantees, scaling behavior and cost drivers.

When would you use BigQuery versus Bigtable, Spanner, or Cloud SQL?

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Other

When would you use BigQuery versus Bigtable, Spanner, or Cloud SQL? ```hint Start from the access pattern Ask whether the workload scans and aggregates many rows or reads and writes a few rows by key, and how fast each request has to return. ``` ```hint Then look at consistency and scale Consider whether you need multi-row transactions and joins, and whether the data or the write rate can outgrow a single database server. ``` ### What a Strong Answer Covers - The workload each service is built for, in terms of access pattern and latency - The data model, query capabilities and transaction guarantees of each - How each one scales and what drives its cost - Concrete examples of choosing one, with the reason the others fit worse - How the services are combined in one system ### Follow-up Questions - A mobile app needs each user's last 100 events in under 10 ms, and analysts need daily aggregates over all events. How would you store the data? - Why is a timestamp a poor leading component for a Bigtable row key or a Spanner primary key? - When would you move an application from Cloud SQL to Spanner, and what changes in the schema and the application code? - Why can a BigQuery-backed dashboard that refreshes every minute become expensive, and how would you reduce the cost?

Overview: Compare BigQuery, Bigtable, Spanner and Cloud SQL and decide which one fits a given workload. It tests reasoning about analytical versus transactional access patterns, data models, consistency guarantees, scaling behavior and cost drivers.

PracHub logo
General
Nov 24, 2026
mediumData ScientistOtherData Manipulation (SQL/Python)
0
0

When would you use BigQuery versus Bigtable, Spanner, or Cloud SQL?

What a Strong Answer Covers Guidance

  • The workload each service is built for, in terms of access pattern and latency
  • The data model, query capabilities and transaction guarantees of each
  • How each one scales and what drives its cost
  • Concrete examples of choosing one, with the reason the others fit worse
  • How the services are combined in one system

Follow-up Questions Guidance

  • A mobile app needs each user's last 100 events in under 10 ms, and analysts need daily aggregates over all events. How would you store the data?
  • Why is a timestamp a poor leading component for a Bigtable row key or a Spanner primary key?
  • When would you move an application from Cloud SQL to Spanner, and what changes in the schema and the application code?
  • Why can a BigQuery-backed dashboard that refreshes every minute become expensive, and how would you reduce the cost?