hands-on lab

Working with Advanced Components in Cloud Firestore in Datastore Mode

Intermediate
45m
28
5/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab description

When you need to build a NoSQL solution for your application, considering a document-based database could be a winning solution. Sometimes you want to better organize your documents, and having a powerful query language that can perform queries in milliseconds. Firestore in Datastore mode perfectly suits this scenario.

Firestore in Datastore mode offers you the possibility to organize the documents leveraging ancestors. It means you can create hierarchies with documents, so you can better organize your documents avoiding having only flat documents. Firestore in Datastore mode also provides you GQL, a powerful SQL-like query language you can use to query the NoSQL database. Of course you can query the key of your documents, but if you need to query the properties, Firestore gives you the possibility to create indexes attached to them so query will be optimized.

In this lab, you will use Firestore in Datastore mode to create a NoSQL database, entities with hierarchic kinds and indexed properties, and you will finally perform some GQL queries.

Learning Objectives

Upon completion of this lab, you will be able to:

  • Organize documents in hierarchies
  • Create entities with an index
  • Perform GQL queries

Intended Audience

  • Google Cloud Professional Data Engineer (PDE) candidates
  • Data engineers who want to deep leverage the components offered by Firestore
  • Software engineers curious about the possible scenarios achievable using Firestore

Prerequisites

To get the most from this lab, you should be familiary with Firestore in Datastore mode. The following lab can be followed:

Environment before
Environment after
About the author
Students
40,007
Labs
106
Courses
2
Learning paths
10

Stefano studies Computer Science and is passionate about technology. He loves working with Cloud services and learning all the best practices for them. Google Cloud Platform and Amazon Web Services are the cloud providers he prefers. He is a Google Cloud Certified Associate Cloud Engineer. Node.js is the programming language he always uses to code. When he's not involved in studying or working, Stefano loves riding his motorbike and exploring new places.

Covered topics
Lab steps
Signing In to the Google Cloud Console
Creating a New Firestore Database
Creating Hierarchic Entities with Indexed Properties
Querying a Firestore Database Using GQL