现已推出具有 MongoDB 兼容性的 Firestore 企业版!
了解详情。
MongoDB 相容性總覽
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
僅適用於 Cloud Firestore Enterprise 版。
|
開發人員可透過與 MongoDB 相容的 Cloud Firestore,搭配 Cloud Firestore 使用現有的 MongoDB 應用程式程式碼、驅動程式、工具,以及與 MongoDB 整合的開放原始碼生態系統。
Cloud Firestore 提供別具特色的無伺服器文件資料庫服務,具備同步一致的多區域複製功能、近乎無限的擴充性、業界領先的高可用性 (服務水準協議高達 99.999%),以及只有個位數毫秒的讀取效能。
與 MongoDB 相容的 Cloud Firestore 屬於 Enterprise 版的一部分。
主要功能
與 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控管服務完全整合,如「安全性與存取權管理」一文所述。
後續步驟
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-29 (世界標準時間)。
[null,null,["上次更新時間: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)"]]