Datastore 모드의 Firestore(Datastore)는 자동 확장, 고성능, 간편한 애플리케이션 개발을 위해 설계된 NoSQL 문서 데이터베이스입니다. Datastore 기능은 다음과 같습니다.
원자적 트랜잭션. Datastore는 일련의 작업을 모두 성공하거나 모두 취소하는 방식으로 실행할 수 있습니다.
읽기 및 쓰기의 고가용성. Datastore는 장애 지점의 영향을 최소화하기 위해 중복화를 사용하는 Google 데이터 센터에서 실행됩니다.
고성능의 방대한 확장성. Datastore는 분산형 아키텍처를 사용하여 확장을 자동으로 관리합니다. Datastore는 쿼리가 데이터 세트 크기가 아닌 결과 집합의 크기에 따라 확장되도록 색인과 쿼리 제약조건을 적절히 조합합니다.
유연한 데이터 저장 및 쿼리. Datastore는 객체 지향 및 스크립트 언어에 자연스럽게 매핑되며 여러 클라이언트를 통해 애플리케이션에 노출됩니다. 또한 SQL과 유사한 쿼리 언어도 제공합니다.
Strong consistency. Datastore는 모든 쿼리에 strong consistency를 가지도록 합니다.
저장 데이터 암호화. Datastore는 데이터를 디스크에 기록하기 전에 모두 자동으로 암호화하고 승인된 사용자가 읽을 때 데이터를 자동으로 복호화합니다. 자세한 내용은 서버 측 암호화를 참조하세요.
계획된 다운타임 없는 완전 관리형. Google에서 서비스 관리를 책임지므로 개발자는 애플리케이션 개발에 집중할 수 있습니다. 서비스가 계획된 일정에 따라 업그레이드되는 동안에도 애플리케이션에서 계속 Datastore를 사용할 수 있습니다.
관계형 데이터베이스와 비교
Datastore 인터페이스는 많은 기능이 관계형 데이터베이스와 비슷하지만 NoSQL 데이터베이스로서 데이터 객체 간의 관계를 설명하는 방법이 다릅니다. Datastore 개념과 관계형 데이터베이스 개념을 개괄적으로 비교하면 다음과 같습니다.
개념
Datastore
Firestore
관계형 데이터베이스
객체 카테고리
종류
컬렉션 그룹
표
단일 객체
항목
문서
행
객체의 개별 데이터
속성
필드
열
객체의 고유 ID
키
문서 ID
기본 키
관계형 데이터베이스 테이블의 행과 달리 동일한 종류의 Datastore 항목에는 여러 가지 속성이 있을 수 있고, 각 항목마다 이름은 동일하지만 값 유형이 다른 속성이 있을 수 있습니다. 이러한 고유한 특성으로 인해 자동 확장 기능을 활용하기 위한 데이터 설계 및 관리 방법이 다양해집니다. 특히 Datastore는 다음과 같은 점에서 기존 관계형 데이터베이스와 다릅니다.
Datastore는 대규모 데이터 세트로 자동 확장되도록 설계되었으므로 애플리케이션에 유입되는 트래픽 양이 많아져도 애플리케이션이 고성능을 유지할 수 있습니다.
Datastore는 필요에 따라 데이터를 자동으로 분산시켜 쓰기를 확장합니다.
Datastore는 데이터 세트가 아닌 결과 집합 크기에 따라 성능이 확장되는 쿼리만 지원하기 때문에 읽기 확장이 가능합니다. 즉, 결과 집합에 100개 항목이 포함된 쿼리는 검색 범위가 100개 항목이든, 100만 개 항목이든 상관없이 동일한 성능을 보입니다. 이 속성은 일부 쿼리 유형이 지원되지 않는 주요한 이유입니다.
모든 쿼리가 이전에 빌드한 색인에서 제공되므로 실행 가능한 쿼리 유형은 SQL의 관계형 데이터베이스에서 허용되는 쿼리 유형보다 제한됩니다. 특히 Datastore에는 조인 작업, 여러 속성에 대한 불일치 필터링 또는 서브 쿼리 결과에 따른 데이터 필터링 지원이 포함되지 않습니다.
스키마를 강제하는 관계형 데이터베이스와 달리 Datastore에는 스키마가 없습니다. 일관된 속성 집합을 갖기 위해 반드시 같은 종류의 항목이 필요한 것은 아닙니다. 하지만 애플리케이션 코드에서 이러한 요구 사항을 강제할 수 있습니다.
장점
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-04-22(UTC)"],[[["\u003cp\u003eDatastore is a NoSQL document database designed for automatic scaling, high performance, and easy application development, offering features like atomic transactions and high availability.\u003c/p\u003e\n"],["\u003cp\u003eUnlike relational databases, Datastore is schemaless, automatically scales to large datasets, and supports queries that scale with the result set size, not the dataset size.\u003c/p\u003e\n"],["\u003cp\u003eDatastore excels in applications requiring highly available structured data at scale, such as product catalogs, user profiles, and ACID-compliant transactions.\u003c/p\u003e\n"],["\u003cp\u003eDatastore is not ideal for relational database needs, analytic data, or storing large, immutable blobs; alternatives like Cloud SQL, Bigtable, BigQuery, and Cloud Storage are recommended for these use cases.\u003c/p\u003e\n"],["\u003cp\u003eDatastore provides a fully managed service, encrypts data at rest, and offers strong consistency across all queries.\u003c/p\u003e\n"]]],[],null,["# Datastore Overview\n\nFirestore in Datastore mode (Datastore) is a NoSQL document database built for automatic scaling, high performance,\nand ease of application development. Datastore features include:\n\n- **Atomic transactions**. Datastore can execute a set of operations where either all succeed, or none occur.\n- **High availability of reads and writes**. Datastore runs in Google data centers, which use redundancy to minimize impact from points of failure.\n- **Massive scalability with high performance**. Datastore uses a distributed architecture to automatically manage scaling. Datastore uses a mix of indexes and query constraints so your queries scale with the size of your result set, not the size of your dataset.\n- **Flexible storage and querying of data** . Datastore maps naturally to object-oriented and scripting languages, and is exposed to applications through multiple clients. It also provides a SQL-like [query language](/datastore/docs/apis/gql/gql_reference).\n- **Strong consistency**. Datastore ensures that all queries are strongly consistent.\n- **Encryption at rest** . Datastore automatically encrypts all data before it is written to disk and automatically decrypts the data when read by an authorized user. For more information, see [Server-Side Encryption](/datastore/docs/concepts/encryption-at-rest).\n- **Fully managed with no planned downtime**. Google handles the administration of the service so you can focus on your application. Your application can still use Datastore when the service receives a planned upgrade.\n\nComparison with relational databases\n------------------------------------\n\nWhile the Datastore interface has many of the same features\nsimilar to relational databases, as a NoSQL database, it varies in how it\ndescribes the relationships between data objects. Here's a high-level comparison\nof Datastore and relational database concepts:\n\nUnlike rows in a relational database table, Datastore entities of\nthe same kind can have different properties, and different entities can have\nproperties with the same name but different value types. These unique\ncharacteristics imply a different way of designing and managing data to take\nadvantage of the ability to scale automatically. In particular,\nDatastore differs from a traditional relational database in the\nfollowing important ways:\n\n- Datastore is designed to automatically scale to very large data sets, allowing applications to maintain high performance as they receive more traffic:\n - Datastore writes scale by automatically distributing data as necessary.\n - Datastore reads scale because the only queries supported are those whose performance scales with the size of the result set (as opposed to the data set). This means that a query whose result set contains 100 entities performs the same whether it searches over a hundred entities or a million. This property is the key reason some types of queries are not supported.\n- Because all queries are served by previously built indexes, the types of queries that can be executed are more restrictive than those allowed on a relational database with SQL. In particular, Datastore does not include support for join operations, inequality filtering on multiple properties, or filtering on data based on results of a subquery.\n- Unlike relational databases which enforce a schema, Datastore is schemaless. It doesn't require entities of the same kind to have a consistent set of properties (although you can choose to enforce such a requirement in your own application code).\n\nWhat it's good for\n------------------\n\nDatastore is ideal for applications that rely on highly available structured data at scale. You can use Datastore to store and query all of the following types of data:\n\n- Product catalogs that provide real-time inventory and product details for a retailer.\n- User profiles that deliver a customized experience based on the user's past activities and preferences.\n- Transactions based on [ACID](https://en.wikipedia.org/wiki/ACID) properties. For example, transferring funds from one bank account to another.\n\nOther storage and database options\n----------------------------------\n\nDatastore is not ideal for every use case. For example, Datastore is not a relational database, and it is not an effective solution for analytic data.\n\nHere are some common scenarios where you should probably consider an alternative to Datastore:\n\n- If you need a relational database with full SQL support for an online transaction processing (OLTP) system, consider [Cloud SQL](/sql).\n- If you don't require support for ACID transactions or if your data is not highly structured, consider [Bigtable](/bigtable).\n- If you need interactive querying in an online analytical processing (OLAP) system, consider [BigQuery](/bigquery).\n- If you need to store large immutable blobs, such as large images or movies, consider [Cloud Storage](/storage).\n\n\nFor more information about other database options, see the [overview\nof database services](/products/databases).\n\nWhat's next\n-----------\n\n- [Learn how to store and query data using the Google Cloud console](/datastore/docs/store-query-data)\n- [Learn about the Datastore data model](/datastore/docs/concepts/entities)\n- [View best practices for Datastore](/datastore/docs/best-practices)"]]