Realm: Low-Footprint, Thread-Safe Database For iOS And Android
Realm is an open-source, Object-oriented database. It provides a simpler, more performant alternative to using CoreData on iOS and will soon be available on Android as well.
iOS database alternatives such as CoreData, CouchBaseLite as well as ORMLite (Android) are built on top of SQLite. This is because creating reliable and fast storage engine takes a lot of work and SQLite is battle-tested. Realm, however, aims to advance the state of the art and has it’s own C++ core. In the launch announcement, the team explains the rationale for this -
SQLite was revolutionary when it launched in 2000 but developing mobile apps in 2014 is obviously a very different beast than it was 14 years ago, and our notion of what a “phone” or “app” is has also changed drastically. We saw a clear opportunity to provide a fresh start for data on mobile with an easier API and an architecture that benefits from the last decade of innovation in databases. In short, we’re the first mobile-first database.
Some important features -
- Full Acid Guarantee, Immediate Disk persistence by default
- Safe across Threads
- Object relationships (one-to-many, many-to-many) and ability to traverse arbitrarily deep, while being memory efficient
- Simple API with just 3 common classes and one utility (Migration) class
- Includes experimental Support for Swift
- Fast – leveraging several techniques such as bit-packing, caching, vectorization and a zero-copy architecture
The team is also promising support beyond iOS native development -
Doc List Oct 25, 2014