Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menjelaskan database Spanner dan propertinya.
Ringkasan
Database Spanner adalah penampung untuk tabel, tabel virtual, dan indeks Anda.
Setiap instance Spanner dapat memiliki beberapa database.
Dalam hierarki Spanner, database adalah turunan dari
instance, dan induk dari skema.
Database mewarisi properti dari instance induknya, seperti konfigurasinya (regional atau multi-region), kapasitas komputasi yang tersedia, dan penyimpanan yang tersedia.
Properti yang ditetapkan di database adalah:
Dialek. Spanner mendukung GoogleSQL dan PostgreSQL. Semua tabel dalam database harus menggunakan dialek yang sama.
Kebijakan IAM. Aturan akses yang ditentukan oleh kebijakan ini
diterapkan ke tabel dan data di dalam database.
Jenis kunci enkripsi yang akan digunakan. Default-nya adalah Google-owned and Google-managed encryption key;
Kunci enkripsi yang dikelola pelanggan juga didukung.
Kebijakan database seperti region pemimpin default, versi pengoptimal kueri,
versi paket statistik pengoptimal kueri, dan periode retensi versi,
dapat ditetapkan atau diubah dengan pernyataan DDL. Lihat referensi DDL untuk
GoogleSQL
atau
PostgreSQL.
Batas database, termasuk jumlah database yang diizinkan per instance, dan
jumlah tabel yang diizinkan per database, ditentukan di halaman
Kuota dan batas.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-17 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)"]]