Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best alternative Android SQLite library? [closed]

Tags:

android

sqlite

For some reason I want to avoid Android's official SQLite implementation.

There seem to be very few alternative, and they seem to be very new, not-tested-much libraries with few operations implemented.

I hope to not be too subjective, but here are the features I need:

  • SQLite format
  • Has SELECT, INSERT, UPDATE, DELETE
  • Basic WHERE, with indexes
  • Indexes are updated (I am not asking for new index creation)
  • Open Source

Note: I recently ported SQLJet to Android, and I just saw the website of SQLdroid (not sure what it does). I am surprised I can't find any fork of Android's SQLite, that could be acceptable as well.

like image 473
Nicolas Raoul Avatar asked Oct 14 '11 10:10

Nicolas Raoul


People also ask

Is there any other database than SQLite that you can implement in Android?

Yes. The Android library provides native support to only SQLite. Of course, this doesn't mean you absolutely can't use other databases on Android; if you need to use other databases, you'll have to either look for already-existing third-party libraries(1), or roll out your own API.

Why realm is faster than SQLite?

The traditional SQLite + ORM abstraction is leaky because ORM simply converts Objects and their methods into SQL statements. As a result, it is a trade-off for developer productivity at the cost of performance. Realm, on the other hand, is an object database, meaning your objects directly reflect your database.

What is getWritableDatabase?

getWritableDatabase() -Create and/or open a database that will be used for reading and writing. The first time this is called, the database will be opened and onCreate(SQLiteDatabase), onUpgrade(SQLiteDatabase, int, int) and/or onOpen(SQLiteDatabase) will be called.

Which database is best for Android?

PostgreSQL. A unique relational database, PostgreSQL is the best database for Android and iOS apps. Developers can customize this database as they want; that's why it's the most preferred mobile app database.


1 Answers

Have you checked the BerkeleyDB? (nice paper here)

Or H2?

like image 73
Regex Rookie Avatar answered Oct 01 '22 18:10

Regex Rookie