Mobile databases: SQLite and SQLite alternatives for Android and iOS

Updated comparison

Note: This is an updated version of an earlier Mobile Database Comparison.

What is a mobile database?

While Wikipedia defines a mobile database as “either a stationary database that can be connected to by a mobile computing device […] over a mobile network, or a database which is actually stored by the mobile device,” we solely refer to databases that run on the edge device itself. Therefore, we also refer to it as “on-device” database. An edge device may be any device from a sensor, to an IoT gateway, to a car, to a Raspberry Pi, to a mobile phone (smartphone) to an on-premise server. Typically, the challenge arises when running on the smaller, more restricted devices. Generally, any database can run on a big server or cloud infrastructure with unlimited resources, but only few fit on a Raspberry Pi Zero.

What are the advantages and disadvantages of working with SQLite?

SQLite is easily the most established edge database and probably the only “established” mobile database. SQLite has been around since the year 2000 and is embedded with iOS and Android since the beginning. SQLite is a relational database.



  • Toolchain, e.g. DB browser
  • No dependencies; included with Android and iOS
  • Developers can exactly define the data schema they want
  • Developers have full control, e.g. they can do handwritten SQL queries
  • SQL is a powerful and established query language, and SQLite supports most of it
  • Debuggable data: developers can grab the database file and analyze it
  • Rock-solid, widely used technology, established since the year 2000

  • Using SQLite means a lot of boilerplate code and thus inefficiencies (also in the long run with the app maintenance)
  • 1 MB BLOB Limitation on Android
  • No compile time checks (e.g. SQL queries)
  • SQLite performance is unreliable
  • SQL is another language to master
  • SQL queries can get long and complicated
  • Testability (how to mock a database?)
  • Especially when database views are involved, maintainability may be poor with SQLite

What are SQLite alternatives?

There are plenty of alternatives to working with SQLite directly. If you simply want to avoid writing lots of SQL and boilerplate code, you can use an object abstraction on top of SQLite. This abstraction layer is usually an ORM (object/relational mapper), e.g. greenDAO.

However, if you rather seek a complete replacement for SQLite, there are a few alternative databases: Couchbase Lite, Interbase, LevelDB, ObjectBox, Oracle Berkeley DB (formerly Oracle’s mobile database was “Oracle Database Lite”), Realm, SnappyDB, SQL Anywhere, and UnQLite.

Obviously, if your also looking for alternatives that are not on-device edge / mobile databases, there are a lot of cloud / server options out there that you can use as a replacement like e.g. Firebase. Though, with these your app will not work offline, response rates will be slower than with an on-device database and cannot be guaranteed, and last not least you will have much higher cloud costs.

To give you an overview, we have compiled a small comparison table:

NameAndroid / iOSType of data storedSync CentralSync P2PData level encryptionLicense / business modelShort descriptionMinimum Footprint sizeCompany
Couchbase Lite, now Couchbase Mobile
Android / iOSJSON Documents / NoSQL db YesYesDatabase encryption with SQLCipher (256-bit AES)Apache 2.0Embedded / portable db with P2P and central synchronization (sync) support. Secure SSL.Couchbase
Android / iOSKey-value pairs / NoSQL dbNoNoNoApache 2.0Portable lightweight key-value store, NoSQL database.
InterBase ToGo / IBLite
Android / iOSRelationalNoNo256bit AES strength encryptionProprietaryEmbeddable SQL database.400 KBEmbarcadero
Android / iOSKey-value pairs / NoSQL dbNoNoNoNew BSDPortable lightweight key-value store, NoSQL db, doesn't support indexes, very fast for some use cases; earlier available enchmarks from 2011 have been removed unfortunately.350kBLevelDB Team
ObjectBox DB
Android / iOSObjectoriented NoSQL database for high-perormance on edge devices in Mobile and IoTYesIn developmenttransport encryption; additional encryption upon requestApache 2.0 and ProprietaryEmbedded object-oriented NoSQL edge database with out-of-the-box synchronization; fully ACID compliant; optimized for speed restricted devices, benchmarks available.< 1MBObjectBox
Oracle Database Lite
Android / iOSRelational and Key-Value-StoreWith Oracle Mobile ServerWith Oracle Mobile Server128-bit AES Standard encryptionProprietaryEmbedded / portable db with P2P and central sync support as well as support for sync with SQLite.< 1MBOracle Corporation
Snappy DB
AndroidKey-value pairs / NoSQL dbNoNoNoApache 2.0Portable lightweight key-value store, NoSQL db based on LevelDB.Nabil HACHICHA
Android / iOSObject DatabaseNoNoYes Apache 2.0 License APIs with proprietary sync.Embedded object db.Realm Inc.
SQL Anywhere; Ultralite is the mobile version
Android / iOSRelationalDependantNoAES-FIPS cipher encryption for full database or selected tablesProprietaryEmbedded / portable db with central snyc support with a stationary database.Database memory footprint: only 300KB for mobile devicesSybase iAnywhere
embedded on iOS and AndroidRelationalNoNoNo, Use SQLCipher to encrypt SQLitePublic domainC programming library; clear market leader).500KiBHwaci
Android / iOSKey-value pairs / document store / NoSQL dbNoNo2-Clause BSDPortable lightweight embedded db; self-contained C library without dependency.Symisc systems

If you are interested in an indication of the diffusion rate of databases and mobile databases, check out the following database popularity ranking: http://db-engines.com/en/ran.

Thanks for reading and sharing. Please let us know what you’re missing.

Spread the love