#
Cloud Spanner Database
This tutorial explains what is and how to use Cloud Spanner database in GCP.
Cloud Spanner is a fully managed, mission-critical, relational database service that offers transactional consistency at global scale, automatic, synchronous replication for high availability, and support for two SQL dialects: Google Standard SQL (ANSI 2011 with extensions) and PostgreSQL.
Once we have created a Cloud Spanner instance we need to attach one or more database to that instance.
In order to create a Cloud Spanner database we are going to GCP Console and we click on "Databases" -> "Spanner":
If you are in the Cloud Spanner page for the first time, you will see a page like this:
Click on "my-spanner" instance.
On the bottom of the page click on "CREATE DATABASE" button.
Choose the database name, select the database dialect. Click on "CREATE" button in order to create the database.
Now we can create a Cloud Spanner database schema. Click on "CREATE SCHEMA" button.
Enter the definition of a table and click on "Submit" from the bottom of the page.
At this point a new schema is created and a table is added to that schema.