开发者

Does Android support any other database system other than SQLite?

I have been searching and have foun开发者_运维问答d out, that android supports only SQLite databse and no other. Is this true?


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.

(1) Careful there: If you look for third-party libraries, make sure they're built specifically for Android, since Android includes only a subset of the Java standard library. If they're not specifically built for Android, there's a possibility that the libraries won't work due to missing classes.


Yes, Android Supports H2 Database too. please check it out with below link,

http://www.h2database.com/html/tutorial.html#android

Thanks,


Though SQLite is natively supported on Android and is most used database, there exists other options as well. Listing a few of them below;

Realm: Reactive, concurrent, and lightweight, allowing you to work with live, native objects. https://realm.io/docs/

H2: Full Unicode support including UPPER() and LOWER(). Streaming API for BLOB and CLOB data. Fulltext search. Multiple connections. http://www.h2database.com/html/tutorial.html#android

CouchDB: Full CRUD and query functionality, NoSQL, lightweight, embedded, syncable https://developer.couchbase.com/mobile/

LevelDB: Lightweight and single purpose (not an SQL database) http://leveldb.org/ Java wrapper: https://github.com/hf/leveldb-android

I am not including BerkeleyDB here as (AFAIK) it needs OS level changes to be made to replace the SQLite routines. More info here https://blogs.oracle.com/berkeleydb/now-you-can-build-berkeley-db-into-your-android-apps


SQLite is the only one I ever actually see being used. I would suggest using it because it is lightweight and free to use. When developing your App, lightweight is key, memory is limited on these devices! Is there any specific reason why you wouldn't want to use SQLite? Any feature that you're looking for that you don't see in SQLite?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜