Why Use Realm?

check

Fast and lightweight and the best

Build data rich apps without draining device resources with Realm's lazy loading and zero-copy architecture.
check

Simple to start and scale

The object-oriented data model lets developers work directly with native objects – no ORMs or DAOs needed.
check

Built-in mobile to cloud sync

Real-time mobile to cloud data sync makes it easy to build interactive features that keep data up-to-date across multiple devices, users, and the backend.

Launch faster with intuitive APIs

Accelerate time-to-market with easy to learn, language-native APIs that simplify data access.
// Your object classes are your database schema definition
class Dog: RealmObject {
    var name: String = "",
    var age: Int = 0
}

class Person: RealmObject {
    @PrimaryKey var _id: String = "",
    var name: String = "",
    var age: Int = 0,
    // Create relationships by pointing an Object field to another Class
    var dogs: RealmList<Dog> = realmListOf()
}

// Use Realm objects like regular Kotlin objects
val dog = Dog().apply {
  name = "Rex"
  age = 1
}

// Open a Realm reference
val config = RealmConfiguration.with(schema = setOf(Person::class, Dog::class))
val realm = Realm.open(config)

// Add the dog to the realm
realm.write {
    copyToRealm(dog)
}

Build full mobile apps with ease

Device Sync, backed by MongoDB Atlas, handles the most complex part of connecting your client to the backend with ease – guaranteeing an app that works as expected and syncs data reliably, every time.
class Dog: RealmObject {
    @PrimaryKey var _id: String = “”
    var name = “”
    var age = 0
  }
  
  suspend fun example() {
    val app = App(“Your app Id”)
    // MongoDB Realm offers built-in Auth to secure Syncing data
    val user = app.login(Credentials.anonymous())
   
    // Data can be Synced with a simple configuration
    val config = SyncConfiguration.with(app.currentUser(), "myPartition", setOf(Person::class, Dog::class))
    val realm = Realm.getInstance(config)
  }

Upcoming events & meetups

Join us for regular meetups and find out where our Engineers and Advocates are speaking at key events.

Missed a Realm event or meetup? Head over to our Youtube channel to catch up on the meetups and livestreams with our Realm team and community members.

upcoming events

Getting started

Learning from scratch

See Realm in action in this task tracker tutorial where you’ll learn how to make a collaborative task tracker app using Realm and Device Sync.

Advanced Realm guides

If you’re already familiar with Realm, read our documentation to increase your skills.

Configuring Device Sync

View our guides and documentation to learn how to enable Device Sync for your Realm app.

Github repos

Check out readmes and sample repos or start a feature discussion on Github.

Recent articles

Saving Data in Unity3D Using SQLite

by Dominic Frei
Persisting data is an important part of most games. Unity offers only a limited set of solutions, which means we have to look around for other options as well. In this tutorial series, we will explore the options given to us by Unity and third-party libraries.

From Zero to Mobile Developer in 40 Minutes

by Andrew Morgan
Video showing how to build your first iOS app using SwiftUI and Realm

Migrating Android Apps from Realm Java SDK to Kotlin SDK

by Jorge D. Ortiz-Fuentes, Mohit Sharma
This is a guide to help you migrate you apps that are using the Realm Java SDK to the newer Realm Kotlin SDK. It covers the most important changes that you need to put in place to use the Kotlin SDK.

Frequently asked questions

What is Realm?

Realm is an object-oriented mobile database built to make storing, querying, and syncing data simple. No ORMs or DAOs required.

Is Realm just a wrapper on top of SQLite?

No, Realm is built from the ground up as a modern, performant alternative to SQLite.

Is Realm ACID-compliant?

Yes, Realm is ACID-compliant.

What languages and frameworks does Realm support?

Realm supports a variety of languages including Swift, Objective-C, Kotlin, Java, JavaScript, React Native, Xamarin, C#, Dart, Flutter, .NET for C#, and Unity.

What is MongoDB’s relationship with Realm?

MongoDB acquired Realm in 2019 and has since released Device Sync – a mobile to cloud synchronization solution that syncs data from Realm to MongoDB’s fully managed cloud offering, Atlas. MongoDB is committed to keeping the Realm database open source and free to use.

Deploy Realm in minutes

Deploy an iOS, Android, or cross-platform “To Do” app with real-time sync in minutes.