Stay organized with collections
Save and categorize content based on your preferences.
Firestore is a NoSQL document database built for automatic scaling,
high performance, and ease of application development. It is the newest version
of Datastore and introduces several improvements over
Datastore.
Because Firestore in Datastore mode (Datastore)
is optimized for server use cases and for App Engine, we recommend using
Datastore for databases that will be used primarily by
App Engine apps. Firestore in Native mode is most useful for
mobile and real-time notification use cases. For more information about
Firestore modes, see Choosing between Native Mode and
Datastore mode.
This document describes how to use the
Cloud Client Libraries to store and
retrieve data in a Datastore mode database.
Prerequisites and setup
Set up your environment and project to understand how
apps are structured in App Engine. Write down and save your project ID, because
you will need it to run the sample application described in this document.
Clone the repository
Download (clone) the sample:
Edit project configuration and set dependencies
Application code
Using index.yaml files
The sample app performs queries. More elaborate
Datastore mode queries require one or more
indexes, which you must specify in an
index.yaml file
that you upload along with your app. This file may be created manually, or
generated automatically while testing your app locally.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-05 UTC."],[[["Firestore in Datastore mode is a NoSQL document database optimized for server use cases and App Engine, making it ideal for applications primarily used within App Engine."],["Firestore in Native mode is better suited for mobile applications and those requiring real-time notifications, offering a different set of functionalities compared to Datastore mode."],["Using Datastore mode queries often requires defining indexes in an `index.yaml` file, which can be created manually or generated automatically during local testing of your application."],["Developers can use the Datastore mode emulator for local development and testing of applications, allowing for a simulated environment before deployment."],["Comprehensive information on Datastore mode, including optimizations and core concepts, can be found in the Firestore in Datastore mode documentation."]]],[]]