Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What types of Databases are available in Android?

Hi all can anyone say why I should use an SQLite database for my mobile application? Are there any databases instead that I can use?

like image 633
araf Avatar asked Apr 06 '11 10:04

araf


People also ask

Which is best database 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.

Which database is used in mobile?

1. MySQL. MySQL is one of the most well-known SQL databases on the market, so it is also commonly used within the development of mobile applications.

What is mobile database Android?

A Mobile database is a database that can be connected to a mobile computing device over a mobile network (or wireless network). Here the client and the server have wireless connections.

Is SQL available for Android?

Microsoft SQL Server is not available for Android but there are a few alternatives with similar functionality. The best Android alternative is SQLite, which is both free and Open Source.


2 Answers

SQLite database is the way to go :-)

smashing magazine posted a nice article about it last week

http://www.smashingmagazine.com/2011/03/28/get-started-developing-for-android-with-eclipse-reloaded/

like image 51
Mark Mooibroek Avatar answered Sep 27 '22 23:09

Mark Mooibroek


Another option is Berkeley DB, which like SQLite is a lightweight, fast, reliable database library. You have a few different options of how you can use Berkeley DB on Android:

  1. Use Berkeley DB via the SQL API as an upgrade/replacement for SQLite. The BDB SQL API is completely SQLite compatible, so your SQLite application should be able to convert to using Berkeley DB very easily. Why would you want to use Berkeley DB instead of SQLite? On Android, it's mostly about concurrency. BDB supports concurrent read and write operations. If your Android application needs that, then BDB is an excellent option. On non-Android platforms, BDB scalability, performance, HA and enterprise Support make it an attractive alternative for applications either using SQLite already or considering using it. There's a useful discussion on OTN about using the BDB SQL API on Android here.
  2. Use Berkeley DB via the key-value API as a simple, local data store.
  3. Use Berkeley DB Java Edition via the key-value, Java Collections or Direct Persistence Layer APIs to manage application data within a pure Java environment. Here's an interesting Blog entry about using Berkeley DB JE on Android.

Disclaimer: I'm the Product Manager for Berkeley DB. That said, we think that SQLite is a great product (we're part of the SQLite Consortium) and we're happy to see people adopting and using it. There are situations where Berkeley DB may be a better choice, hence my suggestion here.

like image 25
dsegleau Avatar answered Sep 27 '22 22:09

dsegleau