Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android DB Wrapper

Tags:

android

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?

like image 403
John Baum Avatar asked Jun 25 '26 17:06

John Baum


1 Answers

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...

like image 90
OschtärEi Avatar answered Jun 27 '26 11:06

OschtärEi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!