Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Juan Francisco Andrade Álvarez
Juan Francisco Andrade Álvarez
23,997 Points

What is your favorite ORM for Sqlite on Android?

HI, I would like to know any ORM tools for working with sqlite databases on Android. I've played a little with Sugar ORM (http://satyan.github.io/sugar/). It seems simple but a good ORM to work with. However it would be nice to know if there is any tool, more complete and more professional than Sugar.

Thanks.

Kevin Faust
Kevin Faust
15,353 Points

I most recently used a orm called Realm while building an app. Really fast, clean, and simple so you might want to check it out

Seth Kroger
Seth Kroger
56,413 Points

greenDao Is a very good one, particularly with it's latest updates. GreenDao 3 uses JPA-like annotations (Java Persistence API) and the Data Access Object pattern (or DAO, hence the name) like you would in server-side Java. If you've worked with Hibernate before you should find it fairly familiar.

ORMLite Is another good one, and also the most popular. It uses a similar entity annotations + DAO pattern approach.

I find Sugar is too simple for it's own good. Its performance is over an order of magnitude worse than most other ORM choices as well.

Juan Francisco Andrade Álvarez
Juan Francisco Andrade Álvarez
23,997 Points

Thanks for the answers. Realm looks interesting, even the documentation looks better than greenDAO. However one thing keeps me a little reluctant to use it on a real project and is this fact: "...Although Realm files can be accessed by multiple threads concurrently, they can only be accessed by a single process at a time. Different processes should either copy Realm files or create their own. Multi-process support is coming soon..." (https://realm.io/docs/java/latest/#threads)

Has this been an issue while working with Realm Kevin Faust ? Thanks for the feedback!