Stay organized with collections
Save and categorize content based on your preferences.
This page describes Spanner databases and their properties.
Overview
A Spanner database is a container for your tables, views, and indexes.
Each Spanner instance can have multiple databases.
In the Spanner hierarchy, a database is a child of an
instance, and the parent of a schema.
A database inherits properties from its parent instance, such as its
configuration (regional or multi-region), the available
compute capacity, and the available storage.
Properties that are set on the database are:
The dialect. Spanner supports GoogleSQL and
PostgreSQL. All of the tables in a database must use the same
dialect.
An IAM policy. The access rules defined by this policy are
applied to the tables and data inside the database.
The type of encryption key to use. The default is a Google-owned and Google-managed encryption key;
a customer-managed encryption key is also supported.
Database policies such as the default leader region, query optimizer version,
query optimizer statistics package version, and version retention period,
can be set or modified with DDL statements. See the DDL reference for
GoogleSQL
or
PostgreSQL.
Database limits, including the number of databases allowed per instance, and the
number of tables allowed per database, are defined on the
Quotas and limits page.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Databases overview\n\nThis page describes Spanner databases and their properties.\n\nOverview\n--------\n\nA Spanner database is a container for your tables, views, and indexes.\nEach Spanner instance can have multiple databases.\n\nIn the Spanner hierarchy, a database is a child of an\n[instance](/spanner/docs/instances), and the parent of a [schema](/spanner/docs/schema-and-data-model).\n\nA database inherits properties from its parent instance, such as its\nconfiguration (regional or multi-region), the available\n[compute capacity](/spanner/docs/compute-capacity), and the available storage.\n\nProperties that are set on the database are:\n\n- The [dialect](/spanner/docs/postgresql-interface#choosing_between_and). Spanner supports GoogleSQL and PostgreSQL. All of the tables in a database must use the same dialect.\n- An [IAM policy](/spanner/docs/grant-permissions#database-level_permissions). The access rules defined by this policy are applied to the tables and data inside the database.\n- The type of encryption key to use. The default is a Google-owned and Google-managed encryption key; a [customer-managed encryption key](/spanner/docs/cmek) is also supported.\n- [Database deletion protection](/spanner/docs/prevent-database-deletion) to prevent accidental deletion of databases.\n- Database policies such as the default leader region, query optimizer version, query optimizer statistics package version, and version retention period, can be set or modified with DDL statements. See the DDL reference for [GoogleSQL](/spanner/docs/reference/standard-sql/data-definition-language#alter-database) or [PostgreSQL](/spanner/docs/reference/postgresql/data-definition-language#alter-database).\n\nDatabase limits, including the number of databases allowed per instance, and the\nnumber of tables allowed per database, are defined on the\n[Quotas and limits](/spanner/quotas) page.\n\nConsiderations\n--------------\n\nBefore creating a database, consider the implications of your schema design.\nRead [Schema design best practices](/spanner/docs/schema-design), as well\nas the [Schema and data model](/spanner/docs/schema-and-data-model) document, particularly the\nsection on [Designing for multi-tenancy](/spanner/docs/schema-and-data-model#multitenancy).\n\nWhat's next\n-----------\n\n- [Create and manage databases](/spanner/docs/create-manage-databases)"]]