3

I am working on having a database in my android application and had a question on the different options available for me to use. I dont want to muck directly with SQLite statements as i feel that would be a lot of unecessary boilerplate code. Is there any decent wrappers for the CRUD commands for me to use. I have read a bita obout ORM solutions such as greenDAO and ORMLite but i do not know if that would be overkill or if it would slow down my applicaton. I also have a strict requirement to use SQLCipher to encrypt my db so would the above two solutions have support for this? Any thoughts?

John Baum
  • 3,183
  • 11
  • 42
  • 90

1 Answers1

1

Accordingly to this post SQLCypher works with ORMLite.

I used ORMLite in apps and I'm quite happy with the result. Especially FOR small applications which do not have a ton of data there is no disadvantage in my eyes(and it's surely not an overkill!). Ok your app size increases a little - but seriously this is no problem...

The usage is also very easy: you just have to inlcude the library (copy it in the libs folder) and can start using it.

So in my opinion: Yes use ormlite if you can and want.

However: I do not know how the performance for heavy sqllite usage is.

Edit after some researching:

According to greenDAO, they are much faster than ORM - but wether this is true or wether you should even care about this I don't know. If you check out the statistics you see that ORMLite could (back there in 2011! so it may have changed) make about 2000 inserts / updates per second. Also check out this answer from gray. After reading all this stuff I really don't think you'd come to real performance inssues...

Community
  • 1
  • 1
OschtärEi
  • 2,255
  • 3
  • 20
  • 41