DbSchema lets you design, manage, and document Google Cloud Spanner databases. Create ER diagrams, define tables and columns, and generate SQL scripts - with or without a live database connection.
Use Git to share the design, compare it with the Google Cloud Spanner database, and deploy changes. DbSchema also includes a data editor, query builder, and HTML5 documentation - everything you need in one tool.
Download DbSchema Download Google Cloud Spanner JDBC Driver
Google Cloud Spanner is a globally distributed, horizontally scalable relational database with external consistency and up to 99.999% availability. Its schema model includes interleaved tables — a parent-child structure that co-locates related rows for locality — alongside secondary indexes and foreign keys. Understanding this hierarchy is essential when designing for Spanner's distributed storage, and DbSchema renders the entire structure visually so architects can reason about table relationships without reading raw DDL.
Spanner's interleaved tables create physical co-location between a parent table and its children. DbSchema reads the information schema and renders parent-child relationships as explicit diagram edges, making it straightforward to audit whether interleaving is applied correctly and to document the intended data model for distributed system architects.
Cloud Spanner supports a SQL dialect closely aligned with ANSI SQL. DbSchema's query builder constructs SELECT statements visually — selecting columns, defining join conditions, and applying filters — then executes them directly against your Spanner instance. This is particularly useful for exploring large distributed datasets without writing raw SQL.
DbSchema generates HTML schema documentation from the live Spanner information schema, including ER diagrams, table descriptions, column types, and index definitions. For globally distributed databases shared across multiple engineering teams, this documentation becomes a reliable reference for understanding the data model without direct database access.
Use the Cloud Spanner JDBC driver (google-cloud-spanner-jdbc), which DbSchema can load
via its driver manager. The JDBC URL format is
jdbc:cloudspanner:/projects/project/instances/instance/databases/database.
Authentication uses Application Default Credentials: either set the
GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account JSON key file,
or run gcloud auth application-default login to use your user credentials. Spanner has no
traditional port — all traffic goes through the Cloud Spanner gRPC API on port 443.