Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - Which one to use Active Android or Realm

I have been using ActiveAndroid for a while and i recently heard about Realm being another good option. I was thinking about changing my app to use Realm but before doing that,i was looking if someone has done the performance comparison between these two. I found some comparison on realm's website but those were with ORMLite and SQLite.

Any suggestions are appreciated.

like image 376
mudit Avatar asked May 16 '15 18:05

mudit


People also ask

Which local database is best for Android?

A unique relational database, PostgreSQL is the best database for Android and iOS apps. Developers can customize this database as they want; that's why it's the most preferred mobile app database.

What is an active in Android?

Active Android last updated two years ago, and Realm is a living project. Active Android is just wrapper around SQLite database. Realm offers more features like auto-refreshing query results, creation of objects from JSON, or database change notifications.

Which database is used in Android?

SQLite is a opensource SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation.

What database is used in Android and explain it's advantages?

Most mobile developers are probably familiar with SQLite. It has been around since 2000, and it is arguably the most used relational database engine in the world. SQLite has a number of benefits we all acknowledge, one of which is its native support on Android.


1 Answers

Realm cannot be directly compared to ActiveAndroid as Realm is a mobile database with its own persistence engine built for simplicity and speed to replace the traditional SQLite while ActiveAndroid is an ORM for SQLite. So when moving into Realm means you will no longer be using the traditional SQLite.

Yes, Realm is fast(according to my experience and according to their benchmark tests) but the difference over the traditional SQLite is not noticeable, unless your app uses database transactions or searches heavily, then I suggest you use Realm. If not, then the already working ActiveAndroid would do fine.

Although, I suggest when doing a new project/app, try to familiarize with Realm so that when you would be come up an app that uses database heavily, you really would appreciate the speed of Realm.

like image 151
steven0529 Avatar answered Sep 27 '22 20:09

steven0529