[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-21。"],[[["\u003cp\u003eFirestore 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.\u003c/p\u003e\n"],["\u003cp\u003eFirestore 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.\u003c/p\u003e\n"],["\u003cp\u003eUsing Datastore mode queries often requires defining indexes in an \u003ccode\u003eindex.yaml\u003c/code\u003e file, which can be created manually or generated automatically during local testing of your application.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use the Datastore mode emulator for local development and testing of applications, allowing for a simulated environment before deployment.\u003c/p\u003e\n"],["\u003cp\u003eComprehensive information on Datastore mode, including optimizations and core concepts, can be found in the Firestore in Datastore mode documentation.\u003c/p\u003e\n"]]],[],null,["# Use Firestore in Datastore mode (Datastore)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nGo Java Node.js PHP Python Ruby .NET Custom\n\nFirestore is a NoSQL document database built for automatic scaling,\nhigh performance, and ease of application development. It is the newest version\nof Datastore and introduces several improvements over\nDatastore.\nBecause [Firestore in Datastore mode (Datastore)](/datastore/docs)\nis optimized for server use cases and for App Engine, we recommend using\nDatastore for databases that will be used primarily by\nApp Engine apps. Firestore in Native mode is most useful for\nmobile and real-time notification use cases. For more information about\nFirestore modes, see [Choosing between Native Mode and\nDatastore mode](/datastore/docs/firestore-or-datastore).\n\nThis document describes how to use the\n[Cloud Client Libraries](/datastore/docs/reference/libraries) to store and\nretrieve data in a Datastore mode database.\n\nPrerequisites and setup\n-----------------------\n\n- [Set up your environment and project](/appengine/docs/flexible/setting-up-environment) 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.\n\nClone the repository\n--------------------\n\nDownload (clone) the sample:\n\n\u003cbr /\u003e\n\nEdit project configuration and set dependencies\n-----------------------------------------------\n\n\u003cbr /\u003e\n\nApplication code\n----------------\n\n\nUsing `index.yaml` files\n------------------------\n\nThe sample app performs queries. More elaborate Datastore mode queries require one or more [indexes](/datastore/docs/concepts/indexes), which you must specify in an [`index.yaml` file](/appengine/docs/flexible/configuring-datastore-indexes-with-index-yaml) that you upload along with your app. This file may be created manually, or generated automatically while testing your app locally.\n\nLocal testing\n-------------\n\nIf you need to develop and test your application locally, you can [use the\nDatastore mode emulator](/datastore/docs/tools/datastore-emulator).\n\nFor more information\n--------------------\n\nFor complete information on Datastore mode, including\noptimizations and concepts, see the\n[Firestore in Datastore mode documentation](/datastore/docs/overview)."]]