现已推出具有 MongoDB 兼容性的 Firestore 企业版!
了解详情。
MongoDB 兼容性概览
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
仅与 Cloud Firestore 企业版相关。
|
借助与 MongoDB 兼容的 Cloud Firestore,开发者可以使用现有的 MongoDB 应用代码、驱动程序、工具和 MongoDB 集成的开源生态系统来使用 Cloud Firestore。
Cloud Firestore 是一项差异化的无服务器文档数据库服务,具有强一致性的多区域复制、近乎无限的可伸缩性、业界领先的高可用性(承诺 99.999% 可用性的服务等级协议),以及数毫秒的读取性能。
具有 MongoDB 兼容性的 Cloud Firestore 可作为企业版的一部分提供。
主要功能
与 MongoDB 兼容的 Cloud Firestore 提供多项关键功能:
差异化因素 |
说明 |
MongoDB 兼容性 |
Cloud Firestore 提供与 MongoDB 兼容的 API,让您能够将 Cloud Firestore 用作现有 MongoDB 应用的数据库。 |
无服务器 |
Cloud Firestore 采用按用量计费模式。Cloud Firestore 无需预先预配任何资源,并且会自动扩缩以匹配您的负载。 |
几乎无限的扩缩能力 |
Cloud Firestore 可按需无缝扩缩计算和存储资源,无需配置容量、分片或预配存储空间和 I/O。 |
业界领先的高可用性 |
所有 Cloud Firestore 数据库都具备极高的可用性,单区域部署的可用性为 99.99%,多区域部署的可用性为 99.999%。
Cloud Firestore 具有自动多区域数据复制、强一致性查询、原子批量操作和事务支持。 |
读取延迟时间为个位数毫秒 |
Cloud Firestore 提供数毫秒的读取延迟时间。 |
企业级安全和监控 |
通过集中式 Google Cloud 治理确保 Cloud Firestore 安全无虞。
通过集成的 Database Center,您可以更清楚地了解 Cloud Firestore 数据库舰队的运行情况,并简化管理工作。集中式控制和 AI 辅助可让您获得统一的舰队视图和简化的管理。 |
工作原理
Cloud Firestore 是一种云优先的 NoSQL 文档数据库,与 MongoDB 兼容。
按照与 MongoDB 兼容的 Cloud Firestore 数据模型,您要将数据存储在包含映射到值的字段的文档中。这些文档存储在集合中,而集合是文档中的容器,可用于整理数据和构建查询。文档支持许多不同的数据类型,包括字符串和数值以及复杂的嵌入式对象。
另外,Cloud Firestore 中的查询高效、灵活并且表达能力出色。您可以使用标准 MongoDB 驱动程序或 MongoDB 查询语言 (MQL)。您可以创建浅查询,在文档级别检索数据,而无需检索整个集合;还可以为查询或游标添加排序、过滤和数量限制功能,以对结果进行分页。
最后,兼容 MongoDB 的 Cloud Firestore 已与 Google Cloud 管理服务完全集成,如安全性和访问权限管理中所述
后续步骤
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[],[],null,["\u003cbr /\u003e\n\n\n|--------------------------------------------------------|\n| *Relevant to Cloud Firestore Enterprise edition only.* |\n\n\u003cbr /\u003e\n\nCloud Firestore with MongoDB compatibility enables developers to use existing MongoDB\napplication code, drivers, tools, and the open-source ecosystem of MongoDB\nintegrations with Cloud Firestore.\n\nCloud Firestore offers a differentiated serverless document database service,\nfeaturing multi-region replication with strong consistency, virtually unlimited\nscalability, industry-leading high availability of up to 99.999% SLA, and\nsingle-digit milliseconds read performance.\n\nCloud Firestore with MongoDB compatibility is available as part of the\n[Enterprise edition](/docs/firestore/editions).\n\nKey Capabilities\n\nCloud Firestore with MongoDB compatibility offers a number of key capabilities:\n\n| **Differentiator** | **Description** |\n|----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **MongoDB compatibility** | Cloud Firestore provides a MongoDB compatible API allowing you to use Cloud Firestore as the database for your existing MongoDB applications. |\n| **Serverless** | Cloud Firestore uses a pay-per-use model. Cloud Firestore does not require any pre-provisioning of resources and auto scales to match your load. |\n| **Virtually unlimited scale** | Cloud Firestore seamlessly scales compute and storage on-demand without the need to configure capacity, sharding or provision storage \\& I/O. |\n| **Industry-leading High Availability** | All Cloud Firestore databases offer high availability, with 99.99% availability for regional and 99.999% availability for multi-regional deployments. \u003cbr /\u003e Cloud Firestore has automatic multi-region data replication, strongly-consistent queries, atomic batch operations, and transaction support. |\n| **Single digit milliseconds read latency** | Cloud Firestore offers single digit millisecond read latency. |\n| **Enterprise-grade security and monitoring** | Secure Cloud Firestore with centralized Google Cloud governance. Achieve enhanced visibility and simplified management of your Cloud Firestore database fleet with our integrated Database Center. Benefit from a unified fleet view and simplified management through centralized control and AI assistance. |\n\nHow does it work?\n\nCloud Firestore is a cloud-first, NoSQL document database offering MongoDB\ncompatibility.\n\nFollowing the Cloud Firestore with MongoDB compatibility data model, you store data in documents that\ncontain fields mapping to values. These documents are stored in collections,\nwhich are containers for your documents that you can use to organize your data\nand build queries. Documents support many different [data types](/docs/firestore/enterprise/supported-data-types-drivers),\nfrom strings and numbers, to complex, embedded objects.\n\nAdditionally, querying in Cloud Firestore is expressive, efficient, and\nflexible. You can use standard MongoDB driver or the MongoDB Query Language\n(MQL). You can create shallow queries to retrieve data at the document level\nwithout needing to retrieve the entire collection, and add sorting, filtering,\nand limits to your queries or cursors to paginate your results.\n\nFinally, Cloud Firestore with MongoDB compatibility is fully integrated with Google Cloud governance\nservices as described in [Security and access management](/docs/firestore/enterprise/security-access-management)\n\nWhat's next\n\n- [Get started with Cloud Firestore with MongoDB compatibility](/docs/firestore/enterprise/create-and-query-database)"]]