[MUSIC PLAYING]
SPEAKER 1: Cloud Spanner is a no-compromise database,
combining the abilities of a relational database
with horizontal scale.
It allows you to launch faster and enjoy less administration.
This Quick Start shows you how to perform basic operations
in Cloud Spanner using the Google Cloud Platform Console.
When you first use Cloud Spanner,
you must create an instance, which
is an allocation of resources that are used by Cloud Spanner
databases in that instance.
Click Create Instance.
We used Test Instance as the name and ID of this instance.
Choose Regional Configuration, and pick any configuration
from the dropdown menu.
Your instance configuration determines
the geographic location where your instances
are stored and replicated.
We'll keep the one for the node count, and click Create.
Your instance appears in the Spanner Instances page.
Now it's time to create a database.
Go ahead and click Create Database.
For the database name, enter Example DB.
We'll skip the Define Your Database Schema step for now.
We'll do that in the next section.
Click Create.
Cloud Platform Console displays some database details
after the database has been created.
Next up, we'll create a table schema
for your database using the Cloud Spanner Data Definition
Language, or DDL.
Click Create Table.
And we'll flip the toggle over to Edit as Text.
And in the DDL statement, enter the following statement.
Click Create Table.
This may take a few minutes to finish.
When the operation is complete, the Cloud Platform Console
displays the details of the table that you just created.
The Cloud Platform Console provides an interface
for inserting, editing, and deleting data.
We'll talk about each one in turn.
Let's start with inserting.
Click Data and click Insert, and type in the following data.
We'll do just the first name and last name for now.
And then click Save.
Notice now, the Singers table has one row.
Let's click Insert again and add an additional row.
Enter the following values for our second row.
And click Save.
Notice the Singers table now has two rows.
You can also insert empty string values when entering data.
We'll insert a third row.
This time, in addition to the integer ID key of 3,
we'll just enter a first name and leave the last name blank.
Click Save.
And notice now that the Singers table has three rows.
And the row for singer ID 3 has a last name
that is an empty string.
Let's take a look at how to edit data.
We'll add a birth date to that third row of data.
Check the box, and click Edit.
Enter the following values for Birth Date, and click Save.
We see now that the row for singer ID 3
in the Singers table has a birth date value.
Let's talk about how to delete data.
Deleting data is very similar to editing.
Go ahead and check the box next to the row for singer ID 2,
and click Delete.
In the dialog that appears, click
OK to confirm the deletion.
Notice now that the Singers table has just two rows.
Next, let's run a SQL statement query.
From the Tables page, click Query.
Now, just click Run Query to run the prepopulated query.
The Cloud Platform Console displays
the results of your query.
Congratulations.
You've successfully created a Cloud Spanner database
and executed a SQL statement using the query editor.
[MUSIC PLAYING]