Understanding Cloud Spanner

(3 days)


In this course, you will learn about Cloud Spanner. You will get an introduction to Cloud Spanner, contrasting it with other database products to understand when and how to use Spanner to solve your relational database needs at scale. You will learn how to create and manage Spanner databases using various tools on Google Cloud, learn to optimize relational schemas with Spanner’s distributed database model in mind, interact with your Spanner databases using the Spanner APIs, integrate Spanner with your applications, and learn how to use other Google tools for administering Spanner databases and managing your data. The lab culminates with a challenge lab where you demonstrate your knowledge of administering Spanner databases and managing data.

Course Objectives

  • Build scalable, managed, relational databases using Google Cloud Spanner
  • Create and manage Spanner databases using the CLI, Terraform, Python API, and the Cloud Console
  • Optimize relational database schemas for Spanner’s distributed database model
  • Leverage Google Cloud tools for administering Spanner databases and managing data
  • Program and run queries and transactions using the Spanner API
  • Integrate Spanner with your applications


Intermediate-level training for database administrators, engineers/developers, and cloud architects.


Some prior Google Cloud experience at the fundamental level is assumed. Experience with relational databases, the SQL language, and some programming is also assumed.

Course Outline


Module 1: The Need for Spanner

  • What Is Spanner?
  • Spanner and the CAP Theorem
  • History of Spanner
  • Cloud Spanner Use Cases

Module 2: Getting Started with Spanner

  • Planning Spanner Instances
  • Automating Instance Creating
  • Creating Databases in Spanner

Module 3: Optimizing Spanner Schemas

  • Spanner Architecture
  • Choosing Primary Keys
  • Defining Database Schemas in Spanner
  • Understanding Interleaving and Foreign Keys
  • Understanding Secondary Indexes

Module 4: Programming Spanner Applications, Queries, and Transactions

  • Authentication and Authorization
  • Using the Spanner Client Libraries
  • Running Queries
  • Managing Transactions

Module 5: Deploying Spanner Applications

  • Using Spanner from Applications
  • Building Data Pipelines Into and Out of Spanner

Module 6: Spanner Administration

  • Managing Your Data in Spanner
  • Managing Change
  • Operations

Module 7: Capstone Project

  • Spanner Best Practices
  • Capstone Project