Android - Which one to use Active Android or Realm
Asked Answered
P

6

19

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.

Pentheas answered 16/5, 2015 at 18:23 Comment(3)
Same question. If you have an answer, can you say itFusionism
Are you looking for only a performance comparison? Or a broader comparison (as the title suggests)?Litman
@VickyChijwani : bothPentheas
L
8

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.

Leptorrhine answered 21/5, 2016 at 17:32 Comment(0)
P
2

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.

I think that performance is not relevant unless you inserting millions of records, but if this is true you better use SQL directly.

Piselli answered 9/2, 2016 at 6:25 Comment(0)
D
1

It' better to use Realm. In my last project I used it and it works much better.

In GUI if you want to show list of user who are less than 25 years old.Now you fetch from internet from worker thread but when u will save the data in realm automatically all data will be updated.No need to query again.

It's much faster. And Architecturally easy to use.

Discourse answered 14/6, 2016 at 16:55 Comment(0)
C
1

Realm is a cross-platform solution available for iOS and Android (which is rather great when you target for both).

Cryptonymous answered 24/6, 2016 at 22:22 Comment(1)
this should be a commentIntimacy
F
1

Hi mudit may be too late answer but it's help other's. Myself Realm is the best option.

Realm

Realm is a mobile database and a replacement for SQLite. Although is an OO database it has some differences with other databases. Realm is not using SQLite as it’s engine. Instead it has own C++ core and aims to provide a mobile-first alternative to SQLite. Realm store data in a universal, table-based format by a C++ core. This is what allows Realm to allow data access from multiple languages as well as a range of ad hoc queries.

Advantage's:

  • faster than SQLite (up to 10x speed up over raw SQLite for normal operations)

  • easy to use

  • object conversion handled for you

  • convenient for creating and storing data on the fly

I used my project it's more than 10 x speed compare to SQlite . Because i added 100000 data(row) in for loop SQlite take 18min but Realm only take 20 sec.

Federica answered 6/5, 2017 at 18:57 Comment(0)
F
0

As Realm is a mobile database: a replacement for SQLite & Core Data. For more information please check performance comparison.

But you need to consider another important factor, that is https://realm.io is currently supporting Android and iOS whereas others are Sqllite based so the generated DB you can use even in Windows phones,Tizen etc.

I hope it will be helpful to take the decision.

Furred answered 10/9, 2015 at 19:5 Comment(2)
i am not comparing SQLIte and Realm.. i want to compare Active Android & realm. Also the link you posted is for Realm vs core data (so useless).Pentheas
@Pentheas the thing is ActiveAndroid is SQLlite based ORM, as per there statement "ActiveAndroid allows you to save and retrieve SQLite database records without ever writing a single SQL statement". This even throws an exception called SQLiteException in certain cases for more information please have a look @ guides.codepath.com/android/ActiveAndroid-Guide#overview. I hope it will clear now.Furred

© 2022 - 2024 — McMap. All rights reserved.