13 Introduction
This chapter introduces the Data section of Oracle Backend for Firebase. It explains how Oracle Backend for Firebase stores and exposes application data, and how you work with that data through SDKs and REST APIs. It also sets expectations for what is covered later in this section, including security, indexing, and advanced data features.
Parent topic: Database
13.1 Overview
The Database section documents how Oracle Backend for Firebase represents data and how developers interact with it. It covers the data models, how to use SDKs and REST APIs, how security rules are applied, how indexing works, and advanced capabilities such as collection groups, joins, realtime updates, and CLI workflows.
If you are new to Oracle Backend for Firebase, start with the data model description in Chapter 14. That model is the foundation for the SDK experience and will make the rest of this section easier to follow.
Parent topic: Introduction
13.2 Key Terms
The following are some essential terms you'll encounter throughout this section:
-
Collection: A logical grouping of documents, similar to a table in relational databases.
-
Document: A JSON object stored within a collection. Each document has a unique ID.
-
Subcollections: You can create collections within documents.
-
Collection Group: A set of collections that share the same name but exist under different paths, allowing cross-collection queries.
-
Duality View: A relational table exposed as a document-style collection, enabling hybrid access.
-
Index: A structure that improves query performance. An index can be manual (single/multi-field) or automatic.
-
Snapshot Listener: A mechanism for subscribing to real-time updates on query results.
-
Security Rules: Declarative access control policies defined using CEL expressions.
- CEL Expressions: Common Expression Language used to define security rules.
CEL allows developers to write logical conditions
like:
request.auth != null && request.auth.uid == resource.data.ownerThese expressions evaluate access permissions based on request and resource variables. CEL supports:
-
Boolean logic (
&&,||,!) -
Comparisons (
==,!=,<,>) -
Membership (
in,not in) -
String and numeric operations
-
Nested field access (
resource.data.field.subfield)
CEL expressions are evaluated at runtime to enforce read/write/delete/list permissions on documents and collections.
-
Parent topic: Introduction
13.3 Data Models
Oracle Backend for Firebase supports multiple ways to represent application data. The current models are:
-
Document-Collection Model: JSON documents grouped into collections, with optional subcollections for hierarchical data. This is the core Oracle Backend for Firebase SDK experience.
-
Relational-to-Collection Mapping: Existing relational tables are mapped into a collection hierarchy without copying data. This is configured in the Oracle Backend for Firebase Console and is designed for existing Oracle schemas.
-
Standalone Duality Views (advanced): Custom duality views created outside the Console and exposed as collections when you need a tailored document shape over relational data.
The Data Model chapter defines these models in detail, including limits and when to use each.
Parent topic: Introduction
13.4 What You Will Learn in This Section
This section explains how to work with data in Oracle Backend for Firebase:
-
Using SDKs and REST APIs to create, read, update, and delete documents.
-
Querying data, including filters, ordering, pagination, and collection group queries.
-
Realtime updates and snapshots for live data changes.
-
Security rules and how they control read and write access.
-
Indexing concepts and when indexes are required.
-
Advanced relational features such as joins and duality views.
-
Console and CLI workflows for managing projects and data resources.
Parent topic: Introduction
13.5 How to Use This Section
For new app developers, a recommended reading path is:
-
Chapter 14 Data model, to understand the document-collection model and relational mapping.
-
SDK usage topics, to learn CRUD and query patterns.
-
Security rules and indexing, to enforce access control and performance.
-
Advanced features, including collection groups, joins, and realtime updates.
-
Console and CLI sections, for project and environment management.
Parent topic: Introduction