Google Cloud Datastore : NoSQL Database

Color Orange
Google Cloud - Community
3 min readMay 26, 2016

Google Cloud Datastore is a NoSQL database which is one of the offering of Google Cloud Platform. Datastore is highly scalable and superfast. Datastore has many cool things compared to other NoSQL database, we will go through them one by one.

  1. Aromatic Sharding & Replication of your data, so no need to worry about scaling, its a fully managed product.
  2. Superfast and always available, no need to wait to warm up instance or anything like that.
  3. Variety of data types, this including integers, floating-point numbers, strings, dates, and binary data etc.
  4. SQL like queries support, you can set filters on multiple columns and retrieve desired resultset from database
  5. RESTful API, you can keep your application anywhere and can access Cloud Datastore remotely. If your application is on Google App Engine then you can use native API for datastore which is lightning fast where as RESTful is slow compared to native API since it will have to go through authorization and may face latency issue.
  6. Full featured UI Console which provides you access to dashboard, queries console, indexes information and admin area.
  7. Parent child ( Ancestor ) queries, Transactions and Indexes are supported
  8. Strong Consistency, this is one of the feature that I don’t see in other NoSQL Cloud databases. With strong consistent queries it guarantees most up to date data
  9. Languages : JAVA, NODE.JS, PYTHON, GO, PHP
  10. Cost effective, highly durable database at very low price

Cloud Console for Datastore

Cloud console datastore

Queries Console

Datastore queries console

Pricing

  • 1 GB Free
  • 50k Daily read/write operation

For Geeks

I am java geek so would like to give you some more specifics

  • POJO is used to store data, POJO basically becomes your table.
  • If you have Object inside POJO then all its fields are marked as column in datastore, so later you can run queries based on this object. For example Employee POJO has Address as a field (address) and if you save Employee Object in datastore it will create columns like this [address.firstName, address.lastName] for Address.
  • You can run SQL like queries in datastore, i.e. sort result, limit result and delete records by queries.
  • 1 Row can maximum hold 1MB of data.
  • Each table in datastore has a column called ID which is primary key can be generated automatically.
  • In datastore you don’t need to have fixed no. of columns for a table, for example you can have 6 column at first row in table Employee and 15 columns in second row.
  • Redundant data is recommended in NoSQL.
  • Do not use Datastore when your Data is relational, otherwise you will end up with great complexities.
  • There is no join support between two tables.
  • Use Objectify for your datastore library to perform operations, it will save more time.

I hope this guides gives you a kick start on Google’s Cloud Datastore. Sign up to Google Cloud Platform for free, create a project there and explore this more. If you have any questions just comment and ask.

--

--