Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Higher level database layer for Android?

Tags:

Are there any good database abstraction layers/object relational mappers/ActiveRecord implementations/whatever they are called for Android? I'm aware that db4o is officially supported, but it has quite a large footprint and I'd rather use a more conventional database (SQLite).

like image 468
user222469 Avatar asked Dec 03 '09 19:12

user222469


People also ask

What is data layer in Android?

The data layer is made of repositories that each can contain zero to many data sources. You should create a repository class for each different type of data you handle in your app.

What database does Android use?

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.


2 Answers

I am the main author of ORMLite which was designed to be small[ish] but still provide higher level functionality. ORMLite makes calls to the native Android OS database APIs to support its ORM functionality. See the following for general information

http://ormlite.com/sqlite_java_android_orm.shtml

Here are some Android example applications:

http://ormlite.com/docs/android-examples

like image 121
Gray Avatar answered Sep 28 '22 18:09

Gray


I tried the Sugar ORM, which is very basic (and easy to use) but it worked for my needs.

Sugar website

like image 31
enTropy Avatar answered Sep 28 '22 16:09

enTropy