0
0
GCPcloud~30 mins

Why NoSQL on GCP matters - See It in Action

Choose your learning style9 modes available
Why NoSQL on GCP Matters
📖 Scenario: You are working for a company that wants to store and manage large amounts of data that changes quickly. They want to use Google Cloud Platform (GCP) to build a system that can handle this data efficiently.
🎯 Goal: Build a simple GCP NoSQL database setup using Firestore to understand why NoSQL is important on GCP.
📋 What You'll Learn
Create a Firestore database instance
Set a configuration variable for the database mode
Write a query to add data to the Firestore collection
Complete the Firestore setup with proper indexing
💡 Why This Matters
🌍 Real World
NoSQL databases like Firestore on GCP are used to store flexible, fast-changing data such as user profiles, chat messages, or product catalogs.
💼 Career
Understanding how to configure and use NoSQL databases on GCP is essential for cloud engineers and developers building scalable, responsive applications.
Progress0 / 4 steps
1
Create Firestore Database Instance
Create a variable called firestore_instance and set it to the string 'projects/my-project/databases/(default)' to represent the Firestore database instance path.
GCP
Need a hint?

Use a string to represent the Firestore database path exactly as shown.

2
Set Firestore Database Mode Configuration
Create a variable called database_mode and set it to the string 'native' to specify the Firestore database mode.
GCP
Need a hint?

The database mode should be set to 'native' as a string.

3
Add Data to Firestore Collection
Write a line of code that adds a dictionary {'name': 'Alice', 'age': 30} to a Firestore collection called users using a variable called add_user to represent this action.
GCP
Need a hint?

Use a dictionary with keys 'collection' and 'data' to represent adding data to Firestore.

4
Complete Firestore Setup with Indexing
Create a variable called index_config and set it to a dictionary with key 'fields' containing a list with one dictionary that has 'fieldPath' set to 'age' and 'order' set to 'ASCENDING' to represent Firestore indexing configuration.
GCP
Need a hint?

Use a dictionary with a 'fields' key containing a list of dictionaries for indexing.