Firestore 데이터베이스를 만들 때 Native 모드와 Datastore 모드 중 하나를 선택해야 합니다. 이 페이지에서는 두 모드의 차이점을 설명합니다.
데이터베이스 모드 선택
Firestore 데이터베이스를 새로 만들 때 데이터베이스 모드를 선택해야 합니다.
동일한 프로젝트에 Native 모드 데이터베이스와 Datastore 모드 데이터베이스를 모두 포함할 수 있지만 각 데이터베이스는 단일 유형입니다.
데이터베이스 모드 선택 시 권장사항은 다음과 같습니다.
모든 새 애플리케이션 (서버, 모바일, 웹)에는 기본 모드의 Firestore를 사용합니다.
Native 모드의 Firestore는 업계 표준에 부합하는 문서 기반 데이터 모델을 사용합니다. Native 모드의 Firestore는 strong consistency를 가지며 확장 가능한 데이터베이스 외에도 실시간 데이터 동기화 및 서비스형 백엔드 기능을 제공합니다.
앱이 Datastore API에 종속된 경우 Datastore 모드의 Firestore를 사용하세요.
Datastore 모드는 완전히 지원되며 Datastore API에 종속된 애플리케이션에 권장됩니다. 기본 모드와 Datastore 모드는 동일한 가용성, 일관성, 확장 기능을 갖춘 기본 스토리지 레이어를 공유합니다.
기본 모드의 Firestore
Firestore는 Datastore의 다음 주 버전이며 이 제품의 리브랜딩입니다. Datastore와 Firebase 실시간 데이터베이스를 최대한 활용하는 Firestore는 자동 확장, 고성능, 간편한 애플리케이션 개발을 위해 빌드된 NoSQL 문서 데이터베이스입니다.
Firestore는 다음과 같은 기능을 제공합니다.
strong consistency를 갖춘 스토리지 레이어
컬렉션 및 문서 데이터 모델
실시간 업데이트
모바일 및 웹 클라이언트 라이브러리
Firestore는 Datastore의 이전 버전과 호환되지만 새로운 데이터 모델, 실시간 업데이트, 모바일 및 웹 클라이언트 라이브러리 기능은 호환되지 않습니다. 모든 Firestore 기능에 액세스하려면 Native 모드로 Firestore를 사용해야 합니다.
Datastore 모드의 Firestore
Datastore 모드의 Firestore는 Datastore 시스템 동작을 사용하지만 Firestore의 스토리지 레이어에 액세스하여 다음과 같은 Datastore 제한사항을 제거합니다.
eventual consistency를 명시적으로 요청하지 않는 한 이제 모든 Datastore 쿼리가 strong consistency를 가집니다.
트랜잭션의 쿼리는 더 이상 상위 쿼리일 필요가 없습니다.
트랜잭션이 더 이상 25개의 항목 그룹으로 제한되지 않습니다.
항목 그룹에 대한 쓰기가 더 이상 초당 1회로 제한되지 않습니다.
Datastore 모드에서는 Datastore와 호환되지 않는 Firestore 기능이 중지됩니다.
프로젝트는 Datastore API 요청을 수락하고 Firestore API 요청을 거부합니다.
프로젝트는 Firestore 색인 대신 Datastore 색인을 사용합니다.
이 프로젝트에는 Datastore 클라이언트 라이브러리를 사용할 수 있지만 Firestore 클라이언트 라이브러리는 사용할 수 없습니다.
Firestore 실시간 기능은 사용할 수 없습니다.
Google Cloud 콘솔에서 데이터베이스는 Datastore 뷰어를 사용합니다.
가격 책정 및 위치
기본 모드 데이터베이스와 Datastore 모드 데이터베이스는 동일한 가격 책정 구조를 사용하며 동일한 위치에서 사용될 수 있습니다. 가격 책정 및 위치는 다음 페이지에서 자세히 설명합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Choosing between Native mode and Datastore mode\n===============================================\n\nWhen you create a Firestore database, you must choose between two\nmodes: Native mode or Datastore mode. This page explains the difference between\nthe two modes.\n\nChoose a database mode\n----------------------\n\nWhen you create a new Firestore database, you must select a database mode.\nYou can have both Native mode and Datastore mode databases in the same project,\nbut each database will be of a single type.\n\nWe recommend the following when choosing a database mode:\n\n- **Use Firestore in Native mode for all new applications (server, mobile, and web).**\n\n Firestore in Native mode uses a document-based data model that\n aligns with industry standards. In addition to a strongly consistent and\n scalable database, Firestore in Native mode provides real-time\n data syncing and backend-as-as-service features.\n- **Use Firestore in Datastore mode if your app depends on the Datastore API.**\n\n Datastore Mode is fully supported and is recommended for applications with a\n dependency on the Datastore API. Native mode and Datastore mode share an\n underlying storage layer with the same availability, consistency, and\n scaling capabilities.\n\nFirestore in Native mode\n------------------------\n\nFirestore is the next major version of Datastore and\na re-branding of the product. Taking the best of Datastore and the [Firebase\nRealtime Database](https://firebase.google.com/docs/database/rtdb-vs-firestore),\nFirestore is a NoSQL document database built for automatic scaling,\nhigh performance, and ease of application development.\n\nFirestore introduces the following features:\n\n- A strongly consistent storage layer\n- A collection and document data model\n- Real-time updates\n- Mobile and Web client libraries\n\nFirestore is backwards compatible with Datastore, but the new\ndata model, real-time updates, and mobile and web client library features are\nnot. To access all Firestore features, you must use\nFirestore in Native mode.\n\nFirestore in Datastore mode\n---------------------------\n\nFirestore in Datastore mode uses Datastore system behavior but\naccesses Firestore's storage layer, removing the following\nDatastore limitations:\n\n- All Datastore queries are now strongly consistent, unless you explicitly request [eventual consistency](/datastore/docs/reference/data/rpc/google.datastore.v1#google.datastore.v1.ReadOptions).\n- Queries in transactions are no longer required to be ancestor queries.\n- Transactions are no longer limited to 25 entity groups.\n- Writes to an entity group are no longer limited to 1 per second.\n\nDatastore mode disables Firestore features that are not\ncompatible with Datastore:\n\n- The project will accept Datastore API requests and deny Firestore API requests.\n- The project will use Datastore indexes instead of Firestore indexes.\n- You can use Datastore client libraries with this project but not Firestore client libraries.\n- Firestore real-time capabilities will not be available.\n- In the Google Cloud console, the database will use the Datastore viewer.\n\nPricing and locations\n---------------------\n\nNative mode and Datastore mode databases use the same pricing structure and are\navailable in the same locations. Pricing and locations are described in\ndetail in the following pages:\n\n#### Firestore in Native mode\n\n- [Firestore pricing](/firestore/pricing)\n- [Firestore locations](/firestore/docs/locations)\n\n#### Firestore in Datastore mode\n\n- [Firestore in Datastore mode pricing](/datastore/pricing)\n- [Firestore in Datastore mode locations](/datastore/docs/locations)\n\n### Feature comparison\n\nThe following table compares the system behavior of the database modes:\n\nCreate a new database\n---------------------\n\nYou can create a new Firestore database in either Native mode or Datastore mode. This choice does not depend on the modes of any existing databases in your project.\nSee [Create and manage databases](/firestore/docs/manage-databases) for more info.\n\nChange between Native mode and Datastore mode\n---------------------------------------------\n\nIf your database is empty, you can change between Native mode and Datastore mode.\n| **Warning:** Mode changes are only allowed if the database is empty of all entities and documents. A mode change takes a few minutes to take effect during which time the database will reject writes.\n\nChange database to **Native mode**: \n\n### gcloud\n\nUse the [gcloud firestore databases update](https://cloud.google.com/sdk/gcloud/reference/firestore/databases/update) command to change your database to Native mode. \n\n gcloud firestore databases update --type=firestore-native --database='\u003cvar translate=\"no\"\u003eDATABASE_ID\u003c/var\u003e'\n\nReplace \u003cvar translate=\"no\"\u003eDATABASE_ID\u003c/var\u003e with the ID of your database.\n\n### rest\n\n curl --request PATCH \\\n --header \"Authorization: Bearer \"$(gcloud auth print-access-token) \\\n --header 'Accept: application/json' \\\n --header 'Content-Type: application/json' \\\n --data '{\"type\":\"FIRESTORE_NATIVE\"}' \\\n \"https://firestore.googleapis.com/v1/projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/databases/\u003cvar translate=\"no\"\u003eDATABASE_ID\u003c/var\u003e?updateMask=type\"\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID\n- \u003cvar translate=\"no\"\u003eDATABASE_ID\u003c/var\u003e: the database ID\n\nChange database to **Datastore mode**: \n\n### gcloud\n\nUse the [gcloud firestore databases update](https://cloud.google.com/sdk/gcloud/reference/firestore/databases/update) command to change your database to Datastore mode. \n\n gcloud firestore databases update --type=datastore-mode --database='\u003cvar translate=\"no\"\u003eDATABASE_ID\u003c/var\u003e'\n\nReplace \u003cvar translate=\"no\"\u003eDATABASE_ID\u003c/var\u003e with the ID of your database.\n\n### rest\n\n curl --request PATCH \\\n --header \"Authorization: Bearer \"$(gcloud auth print-access-token) \\\n --header 'Accept: application/json' \\\n --header 'Content-Type: application/json' \\\n --data '{\"type\":\"DATASTORE_MODE\"}' \\\n \"https://firestore.googleapis.com/v1/projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/databases/\u003cvar translate=\"no\"\u003eDATABASE_ID\u003c/var\u003e?updateMask=type\"\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID\n- \u003cvar translate=\"no\"\u003eDATABASE_ID\u003c/var\u003e: the database ID"]]