SQL Zone is brought to you in partnership with:

Alec is a Content Curator at DZone and lives in Raleigh, North Carolina. He is interested in Java and Android programming, and databases of all types. When he's not writing for the NoSQL and IoT Zones, you might find him playing bass guitar, writing short stories where nothing happens, or making stuff in Java. Alec is a DZone Zone Leader and has posted 540 posts at DZone. You can read more from them at their website. View Full User Profile

Realm: A Memory-Efficient Mobile Database

07.17.2014
| 5332 views |
  • submit to reddit

If you're a mobile developer looking for a database that won't crush devices more thoroughly than Play Services 5.0, SQLite isn't the only option anymore. Now there's Realm, currently available for iOS (and Android, soon). It runs in phones, tablets, wearables, and so on, and aims to improve performance by maintaining a small footprint.

According to the homepage, Realm gets some performance boost largely from efficient use of memory:

...a custom C++ core is used to provide memory-efficient access to your data by using Realm objects, which usually consume less RAM than native objects. The core also provides an optional persistence layer that can automatically save and retrieve your objects from disk.

In particular, Realm claims performance advantages over SQLite - I haven't seen any benchmarks yet, so it's hard to say, but an interesting possibility nonetheless. They also describe it as offering easy queries and persistence, thread-safety, and easy-to-understand Realm objects, among other things. Take a look at the intro video for more details: