Korzystaj z naszej elastycznej i skalowalnej bazy danych NoSQL w chmurze, utworzonej w infrastrukturze Google Cloud, do przechowywania oraz synchronizowania danych na potrzeby programowania po stronie klienta i serwera.
Cloud Firestore to elastyczna i skalowalna baza danych do tworzenia aplikacji mobilnych, internetowych i serwerowych od Firebase i Google Cloud. Podobnie jak Firebase Realtime Database, synchronizuje dane w aplikacjach klienckich za pomocą odbiorników czasu rzeczywistego i oferuje obsługę offline na urządzeniach mobilnych i w internecie, dzięki czemu możesz tworzyć responsywne aplikacje, które działają niezależnie od opóźnień w sieci lub połączenia z internetem. Cloud Firestore oferuje też płynną integrację z innymi usługami Firebase i Google Cloud, w tym Cloud Functions.
Model danych Cloud Firestore obsługuje elastyczne, hierarchiczne struktury danych.
przechowywać dane w dokumentach pogrupowanych w kolekcje; Dokumenty mogą zawierać złożone, zagnieżdżone obiekty, a także podkolekcje.
Ekspresywne zapytania
W Cloud Firestore możesz używać zapytań do pobierania konkretnych, pojedynczych dokumentów lub wszystkich dokumentów w kolekcji zgodnych z parametrami zapytania. Zapytania mogą zawierać wiele połączonych łańcuchowo filtrów oraz łączyć filtrowanie i sortowanie.
Aktualizacje w czasie rzeczywistym
Podobnie jak Realtime Database, Cloud Firestore stosuje synchronizację do aktualizacji danych na każdym połączonym urządzeniu. Wydajnie obsługuje także proste, jednorazowe
zapytania do pobierania danych.
Obsługa offline
Cloud Firestore umieszcza w pamięci podręcznej dane, z których aplikacja korzysta, umożliwiając zapis, odczyt, nasłuch i wykonywanie zapytań,
nawet jeśli urządzenie jest offline. Gdy urządzenie powróci do trybu online, Cloud Firestore zsynchronizuje wszelkie zmiany lokalne.Cloud Firestore
Zaprojektowane z myślą o skalowalności
Cloud Firestore zapewnia najlepsze funkcje zaawansowanej infrastruktury Google Cloud: automatyczną replikację danych w wielu regionach, gwarancje silnej spójności, niepodzielne operacje wsadowe i obsługę transakcji ACID. Zaprojektowaliśmy Cloud Firestore, aby obsługiwać najbardziej wymagające obciążenia baz danych z największych aplikacji na świecie.
Zgodność z MongoDB
Cloud Firestore udostępnia interfejs API zgodny z MongoDB. Możesz używać istniejącego kodu aplikacji MongoDB, sterowników, narzędzi i ekosystemu integracji MongoDB z Cloud Firestore w wersji Enterprise.
Jak to działa?
Cloud Firestore to hostowana w chmurze baza danych NoSQL, do której aplikacje na urządzenia z Androidem i iOS oraz aplikacje internetowe mogą uzyskiwać bezpośredni dostęp za pomocą natywnych pakietów SDK. Cloud Firestore jest też dostępny w natywnych pakietach SDK Node.js, Java, Python, Unity, C++ i Go, a także w interfejsach REST API i RPC API.
Zgodnie z modelem danych dokumentów Cloud Firestore przechowujesz dane, które zawierają pola mapowane na wartości. Dokumenty te są przechowywane w kolekcjach, czyli kontenerach na dokumenty, których możesz używać do porządkowania danych i tworzenia zapytań. Dokumenty obsługują wiele różnych typów danych, od prostych ciągów znaków i liczb po złożone, zagnieżdżone obiekty. Możesz też tworzyć podzbiory w dokumentach i budować hierarchiczne struktury danych, które skalują się wraz z rozwojem bazy danych. Cloud FirestoreModel danych obsługuje dowolną strukturę danych, która najlepiej sprawdza się w Twojej aplikacji.
Dodatkowo zapytania w Cloud Firestore są wyraziste, wydajne i elastyczne.
Twórz płytkie zapytania, aby pobierać dane na poziomie dokumentu bez konieczności pobierania całej kolekcji ani zagnieżdżonych podkolekcji. Dodaj do zapytań lub kursorów sortowanie, filtrowanie i limity, aby podzielić wyniki na strony. Aby dane w aplikacjach były aktualne bez konieczności pobierania całej bazy danych za każdym razem, gdy następuje aktualizacja, dodaj odbiorniki w czasie rzeczywistym.
Dodanie do aplikacji odbiorników czasu rzeczywistego powiadamia Cię o migawce danych za każdym razem, gdy zmieniają się dane, których nasłuchują aplikacje klienckie. Pobierane są tylko nowe zmiany.
Chroń dostęp do danych w Cloud Firestore za pomocą Firebase Authentication i Cloud Firestore Security Rules na platformach Android i Apple oraz w JavaScript lub za pomocą usługi Identity and Access Management (IAM) w przypadku języków po stronie serwera.
Ścieżka implementacji
Integracja pakietów SDK Cloud Firestore
Szybko dodawaj klientów za pomocą Gradle, CocoaPods lub skryptu.
Zabezpieczanie danych
Używaj Cloud Firestore Security Rules lub Identity and Access Management (IAM), aby zabezpieczać dane odpowiednio na potrzeby tworzenia aplikacji mobilnych i internetowych oraz serwerowych.
Dodaj dane
Tworzenie dokumentów i kolekcji w bazie danych.
Pobieranie danych
Twórz zapytania lub używaj odbiorników czasu rzeczywistego, aby pobierać dane z bazy danych.
Dalsze kroki
Zacznij korzystać z Cloud Firestore – skonfiguruj bazę danych, a następnie dodaj dane i zacznij je odczytywać.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-09-04 UTC."],[],[],null,["Cloud Firestore \nplat_ios plat_android plat_web plat_flutter plat_cpp plat_unity plat_node plat_java plat_python plat_go \nUse our flexible, scalable NoSQL cloud database, built\non Google Cloud infrastructure, to store and sync data for client- and\nserver-side development. \n\nCloud Firestore is a flexible, scalable database for mobile, web,\nand server development from Firebase and Google Cloud. Like\nFirebase Realtime Database, it 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. Cloud Firestore also offers seamless integration with other Firebase\nand Google Cloud products, including Cloud Functions.\n\nCloud Firestore is available in two editions to meet different needs.\n[Learn about the editions](/docs/firestore/editions)\n\nKey capabilities\n\n|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Flexibility | The Cloud Firestore data model supports flexible, hierarchical data structures. Store your data in documents, organized into collections. Documents can contain complex nested objects in addition to subcollections. |\n| Expressive querying | In Cloud Firestore, you can use queries to retrieve individual, specific documents or to retrieve all the documents in a collection that match your query parameters. Your queries can include multiple, chained filters and combine filtering and sorting. |\n| Realtime updates | Like Realtime Database, Cloud Firestore uses data synchronization to update data on any connected device. However, it's also designed to make simple, one-time fetch queries efficiently. |\n| Offline support | Cloud Firestore caches data that your app is actively using, so the app can write, read, listen to, and query data even if the device is offline. When the device comes back online, Cloud Firestore synchronizes any local changes back to Cloud Firestore. |\n| Designed to scale | Cloud Firestore brings you the best of Google Cloud's powerful infrastructure: automatic multi-region data replication, strong consistency guarantees, atomic batch operations, and ACID transaction support. We've designed Cloud Firestore to handle the toughest database workloads from the world's biggest apps. |\n| MongoDB compatibility | Cloud Firestore offers a MongoDB-compatible API. You can use existing MongoDB application code, drivers, tools, and the open-source ecosystem of MongoDB integrations with Cloud Firestore in the [Enterprise edition.](/docs/firestore/enterprise/mongodb-compatibility-overview) |\n\nHow does it work?\n\nCloud Firestore is a cloud-hosted, NoSQL database that your Apple, Android, and\nweb\napps can access directly via native SDKs. Cloud Firestore is also available\nin native Node.js, Java, Python, Unity, C++ and Go SDKs, in addition to REST and\nRPC APIs.\n\nFollowing Cloud Firestore's document data model, you store data 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](/docs/firestore/manage-data/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 Cloud Firestore [data model](/docs/firestore/data-model) supports whatever\ndata structure works best for your app.\n\nAdditionally, querying in Cloud Firestore 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 Cloud Firestore with Firebase Authentication and\nCloud Firestore Security Rules for Android, Apple platforms, and JavaScript, or Identity\nand Access Management (IAM) for server-side languages.\n\nImplementation path\n\n|---|------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| | Integrate the Cloud Firestore SDKs | Quickly include clients via Gradle, CocoaPods, or a script include. |\n| | Secure your data | Use Cloud Firestore Security Rules or Identity and Access Management (IAM) to secure your data for mobile/web and server development, respectively. |\n| | Add Data | Create documents and collections in your database. |\n| | Get Data | Create queries or use realtime listeners to retrieve data from the database. |\n\nNext steps\n\n- [Get started](/docs/firestore/quickstart) with Cloud Firestore --- set up your database, then add data and start reading it.\n- Learn more about the Cloud Firestore [data model](/docs/firestore/data-model).\n- Explore the [differences between Realtime Database and Cloud Firestore](/docs/firestore/rtdb-vs-firestore)."]]