컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Firebase Realtime Database
plat_ios
plat_android
plat_web
plat_flutter
plat_cpp
plat_unity
NoSQL 클라우드 데이터베이스로 데이터를 저장하고 동기화하세요. 모든
클라이언트에서 실시간으로 데이터가 동기화되고 앱이 오프라인일 때도
데이터를 사용할 수 있습니다.
Firebase Realtime Database는 클라우드 호스팅 데이터베이스입니다. 데이터는 JSON으로 저장되며
연결된 모든 클라이언트에 실시간으로 동기화됩니다. Apple 플랫폼, Android, JavaScript SDK로 크로스 플랫폼 앱을 개발하면 모든 클라이언트가 하나의 Realtime Database 인스턴스를 공유하고 자동 업데이트로 최신 데이터를 수신합니다.
또는 더 풍부한 데이터 모델, 쿼리 가능성, 확장성, 가용성이 필요한 최신 애플리케이션에는 Cloud Firestore를 사용해 보세요.
시작할 준비가 되셨나요? 플랫폼을 선택하세요.
iOS+
Android
웹
Flutter
Unity
C++
Admin
REST API
주요 기능
실시간 |
Firebase Realtime Database는 일반적인 HTTP 요청이 아닌 데이터 동기화를 사용하므로 데이터가 변경될 때마다 연결된 모든 기기가 수 밀리초 내에 업데이트를 수신합니다. 따라서 네트워크 코드를 고려하지 않아도 몰입 가능한 협업 환경을 조성할 수 있습니다. |
오프라인 |
Firebase Realtime Database SDK는 데이터를 디스크에 유지하므로 Firebase 앱이 오프라인일 때도 원활하게 작동합니다. 네트워크에 다시 연결되면 클라이언트 기기가 놓쳤던 변경사항이 모두 수신되어 현재 서버 상태와 동기화됩니다. |
클라이언트 기기에서 액세스 가능 |
Firebase Realtime Database를 휴대기기 또는 웹브라우저에서 직접 액세스할 수 있으므로 애플리케이션 서버가 불필요합니다. 데이터를 읽거나 쓸 때 실행되는 표현식 기반 규칙인 Firebase Realtime Database 보안 규칙을 통해 보안 및 데이터 검증이 제공됩니다.
|
여러 데이터베이스에서 규모 조정 |
Firebase Realtime Database에 Blaze 요금제를 적용하면 한 Firebase 프로젝트에서 여러 데이터베이스 인스턴스로 데이터를 분할하여 규모에 따라 유연하게 앱의 데이터 수요를 감당할 수 있습니다. 프로젝트에서 Firebase Authentication으로 인증 작업을 간소화하고 데이터베이스 인스턴스 전체에서 사용자를 인증하세요. 각 데이터베이스 인스턴스에 대한 커스텀 Firebase Realtime Database Security Rules을 사용하여 각 데이터베이스의 데이터 액세스를 제어하세요.
|
기본 원리
Firebase Realtime Database로 클라이언트 측 코드에서 데이터베이스에 직접 안전하게 액세스하여 다기능 협업 애플리케이션을 개발할 수 있습니다. 데이터가
로컬에 유지되고 오프라인일 때도 실시간 이벤트가 계속 발생하므로 최종
사용자에게 원활한 환경이 제공됩니다. 기기가 다시 연결되면 Realtime Database가 클라이언트가 오프라인 상태일 때 발생한 원격 업데이트와 로컬 데이터 변경사항을 동기화하여 모든 충돌 사항을 자동으로 병합합니다.
Realtime Database가 제공하는 유연한 표현식 기반 규칙 언어인 Firebase Realtime Database 보안 규칙을 통해 데이터의 구조 및 데이터를 읽거나 쓸 수 있는 조건을 정의할 수 있습니다. 개발자는 Firebase Authentication과 통합하여 사용자의 데이터 액세스 권한 및 액세스 방법을 정의할 수 있습니다.
Realtime Database는 NoSQL 데이터베이스로서 최적화 방식과 기능성이 관계형 데이터베이스와 다릅니다. Realtime Database API는 오로지 작업 실행 속도를 위주로 설계되었으므로 수백만 사용자가 실시간으로 쾌적하고 원활하게 이용할 수 있는 탁월한 실시간 환경을 구축할 수 있습니다. 따라서 사용자의 데이터 액세스 방법을 미리 계획하고 적절히 구조화하는 것이 중요합니다.
구현 경로
|
Firebase Realtime Database SDK 통합 |
Gradle, CocoaPods 또는 스크립트 포함을 사용하여 클라이언트를 빠르게 통합합니다. |
|
Realtime Database 참조 만들기 |
데이터를 설정하거나 변경을 구독할 'users/user:1234/phone_number'와 같은
JSON 데이터를 참조합니다.
|
|
데이터 설정 및 변경 수신 대기 |
이러한 참조를 사용하여 데이터를 쓰거나 변경을 구독합니다. |
|
오프라인 지속성 사용 설정 |
데이터를 오프라인으로 사용할 수 있도록 기기의 로컬 디스크에
기록합니다.
|
|
데이터 보안 |
Firebase Realtime Database 보안 규칙을 사용하여 데이터를 보호합니다. |
다른 유형의 데이터 저장
다음 단계:
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-04(UTC)
[null,null,["최종 업데이트: 2025-08-04(UTC)"],[],[],null,["Firebase Realtime Database \nplat_ios plat_android plat_web plat_flutter plat_cpp plat_unity \nStore and sync data with our NoSQL cloud database. Data\nis synced across all clients in realtime, and remains available when your\napp goes offline. \n\nRealtime Database \n\nCloud Firestore Preferred \nThe Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON\nand synchronized in realtime to every connected client. When you build\ncross-platform apps with our Apple platforms, Android, and JavaScript SDKs, all of your\nclients share one Realtime Database instance and automatically receive updates with\nthe newest data.\n\nAlternatively, consider trying [Cloud Firestore](/docs/firestore) for modern\napplications requiring richer data models, queryability, scalability and higher\navailability.\n\n\u003cbr /\u003e\n\nReady to get started? Choose your platform:\n\n[iOS+](/docs/database/ios/start)\n[Android](/docs/database/android/start)\n[Web](/docs/database/web/start)\n[Flutter](/docs/database/flutter/start)\n[Unity](/docs/database/unity/start)\n[C++](/docs/database/cpp/start)\n[Admin](/docs/database/admin/start)\n[REST API](/docs/database/rest/start) \n\nKey capabilities\n\n|---------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Realtime | Instead of typical HTTP requests, the Firebase Realtime Database uses data synchronization---every time data changes, any connected device receives that update within milliseconds. Provide collaborative and immersive experiences without thinking about networking code. |\n| Offline | Firebase apps remain responsive even when offline because the Firebase Realtime Database SDK persists your data to disk. Once connectivity is reestablished, the client device receives any changes it missed, synchronizing it with the current server state. |\n| Accessible from Client Devices | The Firebase Realtime Database can be accessed directly from a mobile device or web browser; there's no need for an application server. Security and data validation are available through the Firebase Realtime Database Security Rules, expression-based rules that are executed when data is read or written. |\n| Scale across multiple databases | With Firebase Realtime Database on the Blaze pricing plan, you can support your app's data needs at scale by splitting your data across multiple database instances in the same Firebase project. Streamline authentication with Firebase Authentication on your project and authenticate users across your database instances. Control access to the data in each database with custom Firebase Realtime Database Security Rules for each database instance. |\n\nHow does it work?\n\nThe Firebase Realtime Database lets you build rich, collaborative applications\nby allowing secure access to the database directly from client-side code. Data\nis persisted locally, and even while offline, realtime events continue to fire,\ngiving the end user a responsive experience. When the device regains connection,\nthe Realtime Database synchronizes the local data changes with the remote updates\nthat occurred while the client was offline, merging any conflicts automatically.\n\nThe Realtime Database provides a flexible, expression-based rules language,\ncalled Firebase Realtime Database Security Rules, to define how your data should be\nstructured and when data can be read from or written to. When integrated with\nFirebase Authentication, developers can define who has access to what data, and how\nthey can access it.\n\nThe Realtime Database is a NoSQL database and as such has different optimizations\nand capabilities compared to a relational database. The Realtime Database API is\ndesigned to only allow operations that can be executed quickly. This lets you\nbuild a great realtime experience that can serve millions of users without\ncompromising on responsiveness. Because of this, it is important to think about\nhow users need to access your data and then\n[structure it accordingly](/docs/database/web/structure-data).\n\nImplementation path\n\n|---|-----------------------------------------------|------------------------------------------------------------------------------------------------------------|\n| | Integrate the Firebase Realtime Database SDKs | Quickly include clients using Gradle, CocoaPods, or a script include. |\n| | Create Realtime Database References | Reference your JSON data, such as \"users/user:1234/phone_number\" to set data or subscribe to data changes. |\n| | Set Data and Listen for Changes | Use these references to write data or subscribe to changes. |\n| | Enable Offline Persistence | Allow data to be written to the device's local disk so it can be available while offline. |\n| | Secure your data | Use Firebase Realtime Database Security Rules to secure your data. |\n\nStore other types of data\n\n- [Cloud Firestore](/docs/firestore) is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud. To learn more about the differences between database options, see [Choose a database: Cloud Firestore or Realtime Database](/docs/firestore/rtdb-vs-firestore).\n- [Firebase Remote Config](/docs/remote-config) stores developer specified key-value pairs to change the behavior and appearance of your app without requiring users to download an update.\n- [Firebase Hosting](/docs/hosting) hosts the HTML, CSS, and JavaScript for your website as well as other developer-provided assets like graphics, fonts, and icons.\n- [Cloud Storage](/docs/storage) stores files such as images, videos, and audio as well as other user-generated content.\n\nNext steps:\n\n- Set data and listen for changes using the [Apple platforms](/docs/database/ios/start), [Android](/docs/database/android/start), [Web](/docs/database/web/start), [Admin](/docs/database/admin/start) SDKs, or the [REST API](/docs/database/rest/start).\n- Add Firebase Realtime Database to your [Apple](/docs/database/ios/start), [Android](/docs/database/android/start), or [Web](/docs/database/web/start) app.\n- Learn about how to secure your files using [Firebase Realtime Database Security Rules](/docs/database/security)."]]