Wednesday, March 8, 2017

A Look At Google Cloud : Enterprises Shifting Traditional RDBMS To Cloud

The latest talk on BigData has made traditional RDBMS relegated to a dark corner. But my experience with database is that RDBMS still plays a big role in enterprise operations : either SMBs that don't need the power of BigData (the barrier to entry can be high), or large enterprises are perfectly happy with traditional Data Warehousing/ETL/BI flow.

There are a large number of cloud RDBMS offers : Amazon AWS, Microsoft Azure, and Google Cloud. Google Cloud SQL offers an easy way to quickly setup a MySQL database in the cloud. Without much instruction reading, I was able to intuitively set on up in 5 steps.



1. Create A Google Cloud  Project

All Google Cloud project starts with a Project name. This is the master that can be used to control all infrastructure instances. In fact, it has its own shell (called gcloud) that can be used to programmatically  spin up, shut down, clone, scale infrastructure. For now, I will focus on just creating a project called "projectsource".


2. Create A Google Cloud SQL Instance


A SQL Instance is an easy way to start a  MySQL server. Nothing is really required of the user. I chose default settings for all settings except password.



3. Create A Google Cloud Bucket, Import SQL Query Into Bucket

My SQL database table schema creation and population Python script was written and debugged on my laptop. This could have have been done easily in Google Cloud, but that's a topic for another day. After creating a Google Cloud bucket, I import my SQL query into the bucket.



4. Import SQL Query From Bucket to Google Cloud SQL Instance

Once the SQL query is in a bucket, it can be easily imported into the Google Cloud SQL instance.
The only modification I had to make to the SQL query is that I must "USE" and database. So in the SQL query file (before it was uploaded into the bucket), I  inserted at the beginning of the SQL file  "CREATE DATABASE dbSource; USE dbSouce;"




5. Connect Google Cloud Cloud Shell To SQL Instance and SQL Query To Your Hearts Desire!

Pressing the "Google Cloud" button at the button will invoke the Google Cloud Shell. This is where you will be prompted for your MySQL password.






Conclusion:

Google Cloud SQL enables a quick setup of a MySQL in the cloud, a easy way to upload a SQL query file, then use the full power of SQL in the cloud.




No comments :

Post a Comment