Firestore 是一种灵活且可伸缩的数据库,适用于在 Firebase 和 Google Cloud上进行移动、Web 和服务器开发。Firestore 通过实时监听器使您的数据在各个客户端应用之间保持同步,并为移动和 Web 应用提供离线支持,帮助您构建无论网络延迟时间或互联网连接状况如何都能快速响应的应用。原生模式下的 Firestore 还提供与其他 Firebase 和 Google Cloud 产品(包括 Cloud Run 函数)的无缝集成。
[[["易于理解","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-25。"],[],[],null,["# Firestore overview\n==================\n\nFirestore is a flexible, scalable database for mobile, web,\nand server development from Firebase and Google Cloud.\nFirestore keeps your data in sync across client apps through\nrealtime listeners and offers offline support for mobile and web so you can\nbuild responsive apps that work regardless of network latency or Internet\nconnectivity. Firestore in Native Mode also offers seamless integration with other Firebase\nand Google Cloud products, including Cloud Run functions.\n\nKey capabilities\n----------------\n\nHow does it work?\n-----------------\n\nFirestore in Native Mode is a cloud-hosted, NoSQL database available\nin Node.js, Java, Python, Unity, C++ and Go client libraries, in addition to REST and\nRPC APIs. Apple, Android, and web apps can also access the database\ndirectly using the client libraries.\n\nFollowing Firestore in Native Mode's NoSQL data model, you store data in documents that\ncontain fields mapping to values. These documents are stored in\ncollections, which are containers for your documents that you can use to\norganize your data and build queries. Documents support many different\n[data types](/firestore/docs/concepts/data-types), from simple strings and numbers, to\ncomplex, nested objects. You can also create subcollections within\ndocuments and build hierarchical data structures that scale as your\ndatabase grows. The Firestore in Native Mode [data model](/firestore/docs/data-model) supports whatever\ndata structure works best for your app.\n\nAdditionally, querying in Firestore in Native Mode is expressive, efficient, and flexible.\nCreate shallow queries to retrieve data at the document level without needing to\nretrieve the entire collection, or any nested subcollections. Add sorting,\nfiltering, and limits to your queries or cursors to\npaginate your results. To keep data in your apps current, without retrieving\nyour entire database each time an update happens, add realtime listeners.\nAdding realtime listeners to your app notifies you with a data snapshot whenever\nthe data your client apps are listening to changes, retrieving only the new\nchanges.\n\nProtect access to your data in [Firestore in Native Mode with\nIdentity and Access Management (IAM) for server-side](/firestore/docs/security/iam) languages. For\nAndroid, Apple platforms, and JavaScript protect your data with\n[Firebase Authentication and Firestore Security Rules](/firestore/docs/security/get-started).\n\nWhat's next\n-----------\n\n- [Get started](/firestore/docs/create-database-server-client-library) with Firestore in Native Mode --- set up your database, then add data and start reading it.\n- Learn more about the Firestore in Native Mode [data model](/firestore/docs/data-model).\n- [Create and manage databases](/firestore/docs/manage-databases)."]]