Realm is a reactive, object-oriented, cross-platform, mobile database:
Reactive: query the current state of data and subscribe to state changes like the result of a query, or even changes to a single object.
Object-oriented: organizes data as objects, rather than rows, documents, or columns.
Cross-platform: use the same database on iOS, Android, Linux, macOS, or Windows. Just define a schema for each SDK you use.
Mobile: designed for the low-power, battery-sensitive, real-time environment of a mobile device.
You can also synchronize data between Realm and MongoDB Atlas using Atlas Device Sync. To learn more about using Realm with Device Sync, refer to Device Sync - Flutter SDK.
Realm supports the following popular database features.
Every realm object has a schema. That schema is defined via a native object in your SDK's language. Object schemas can include embedded lists and relations between object instances. To learn more, refer to Define a Schema.
Each realm uses a versioned schema. When that schema changes, you must define a migration to move object data between schema versions. Non-breaking schema changes, also referred to as additive schema changes, do not require a migration. After you increment the local schema version, you can begin using the updated schema in your app. Breaking schema changes, also called destructive schema changes, require a migration function.
To learn more about schema versioning and migrations, refer to Update a Realm Object Schema.
You can use Realm to store data persistently on disk, or ephemerally in memory. Ephemeral realms can be useful in situations where you don't need to persist data between application instances, such as when a user works in a temporary workspace.
To learn more, refer to Configure and Open a Realm.
You can query Realm using Realm Query Language.
To learn more about querying Realm, refer to Read & Write Data.
Realm supports on-device realm encryption. Since memory mapping does not support encryption, encrypted realms use a simulated in-library form of memory mapping instead.
To learn more, refer to Encrypt a Realm.
Indexes are implemented as trees containing values of a given property instead of a unique internal object key. This means that indexes only support one column, and thus only one property, at a time.
To learn more, refer to Index Properties.