Cloud Datastore

NoSQL database for applications development.

In the last lesson, we looked at Cloud Spanner and how it is different from other traditional RDBMS databases. In this lesson, we will learn about “Datastore” which is a NoSQL database built for automatic scaling, high performance, and ease of application development.

Introduction

Datastore is a schema-less database. It doesn’t enforce any schema on the entities to have defined set of attributes. Datastore is built for scale and high performance at scale.

The read and write at scale are managed using different approaches which allow Datastore to perform better with huge datasets.

Datastore manages writes at scale by automatically distributing data as necessary.

Reading data at scale is managed by allowing only those queries whose performance increases with “Resultset” (Not Dataset). The advantage of this is a query whose result set contains 100 entities performs the same whether it searches over a hundred entities or a million.

Comparision with RDBMS

To understand Datastore in a better way we will use the SQL terminologies to match it with the Datastore entities.

Datastore is upgraded to Firestore and moving forward all the Datastore databases will be upgraded to “Firestore in Datastore mode” starting 2021.

When the automatic upgrade process begins in 2021, Google Cloud will begin contacting owners of existing Datastore databases to schedule an automatic upgrade to Firestore in Datastore mode.

Concept Datastore Firestore Relational DB
Category of object Kind Collection Group Table
one object Entity Document row
Individual data for an object Property Field Column
Unique ID Key Document ID primary key

Datastore does not include support for join operations, inequality filtering on multiple properties, or filtering on data based on results of a subquery. These types of operations degrade performance for larger resultset.

One key thing to note is, Datastore or Firestore can be associated only with apps in App engine and you need an app to use Datastore.

Get hands-on with 1400+ tech skills courses.