Google Cloud Platform(GCP) Database

Introduction

In this article, we are going to learn about the databases option available in the Google Cloud Platform(GCP). 

Fundamental of Database

The primary goal of the database is used to organize and persist your data as permanent. So that we can utilize the data on a demand basis. 

To choose a different option of databases, firstly we need to understand the following entities,

  • Consistency (C)
  • Availability(A)
  • Performance(P)
  • Recovery Time Objective (RTO)
  • Recovery Point Objective (RPO)
  • Transaction

Will update you soon with a separate article about CAP Theorem, RTO, and RPO.

Read about the Most Popular Databases in the World.

Choosing Database

We have different types of databases such as Relational databases (OLTP and OLAP), Documents, Key-Value, graphs, In memory and etc., These are the following factors will consider while choosing a database for our project.

  • Is it a fixed schema 
  • Do we need ACID properties?
  • Acceptable latency 
  • Expected Transaction 
  • Volume of Data
  • and other important parameters

Relational Database 

The Relational database is one which is popular in the early days, whenever we want to store it, mostly we go for a relational database, its because of popularity and simply following other use cases. Moreover, it has strong ACID properties and static schema and it has OLAP and OLTP options. To know about Relational Database and the most popular Relational Databases, click here.

In the GCP arena, the CloudSQL, and Cloud Spanner acts as OLTP, and BIQ Query act as OLAP relational database.

Online Transaction Processing (OLTP)

OLTP is one where a large number of application users make a small number of transactions, such as minimal read, and write operations. Moreover, OLTP uses row structure data. 

The Cloud SQL Supports Postgres SQL, SQL and MySQL with regional options and its availability is 99.5%. Also, it can scale a few TBs

The Cloud Spanner can able to scale to multiple PBs with a global option, an option to implement horizontal scaling, however, it's expensive. 

Eg., Legacy Applications, POS, Financial Application

Online Analytics Processing (OLAP)

OLAP is used to do analytics processing, mostly consumed for reporting, BI team to understand the customer journey, used for ML model, so that can able to enhance it further. On top of that OLAP use columnar data, each column can consume its separate node and it's also able to deliver complex query more efficiently. 

GCP recommends Big Query in this case since it can scale PBs of data and distribute data using multiple cluster nodes for a single table. 

NoSQL Database

NoSQL means not SQL, otherwise, we can call it a flexible schema. We can achieve horizontal scaling easily with this option, so eventually, it increases the performance. 

GCP offers a couple of services in this approach such as Datastore and Big Table.

Typically Datastore is one that is used to document databases. It provides strong consistency such as ACID transactions. The upgraded version of the datastore is called as FireStore. This service is useful for mobile and web applications and it is recommended for SME database applications. 

The hierarchy of the database is Collection, Document, and finally fields. Please note that a Collection is one or more sets of documents and fields mean rows. We can create a collection again from the fields. 

Big Table is not serverless, so we have to create instances initially, before creating the database. This option is recommended for large sizes of analytical data such as PBs and not recommended for transaction workloads. 

In-memory Database

The in-memory database is used to read the data from the cache instead of the disk which means we are reducing network traffic to call database, eventually increasing the performance of the application. The recommended GCP service for this service is memory store and the use case for this scenario is frequently accessing data, session management, leader board and etc.,

Finally, we came to the end of the article, I hope you enjoyed it. Thanks for reading. looking forward in next article. 


Similar Articles