SQL databases are a foundation of computing in general, and cloud computing is no exception. Cloud SQL is a particularly robust implementation of a relational database service with rapid scalability, high availability, and secure replication. In this hands-on lab, you’ll see how to set up a Cloud SQL instance, add a MySQL database, and import the schema and data of a large dataset. Once it’s set up, you’ll run through several sample queries.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Enable APIs
Enable the Cloud SQL APIs.
- Create Cloud Storage Bucket
Create a Cloud Storage bucket.
Note: The following locations are allowed in the lab: US-East-1, US-West-1, US-Central-1, Europe-West-1, and Australia-Southeast-1).
- Clone a GitHub Repository and Copy to Bucket
Open the Cloud Shell, clone the GitHub repository, and copy the necessary files to the Cloud Storage bucket.
- Create a Cloud SQL Instance
Create a Cloud SQL instance.
- Create Database, Table, and Import Schema
Create the database, then create a table, and finally, import the schema.
- Import Data
Import the
MetObjects_subset.csv
data.- Query Database
Connect to the database in Cloud Shell, declare the
met_museum
database, and query Met objects.