70

Is there any established noSQL database solution to be used for developing native mobile applications (Android and/or iOs)?

9 Answers 9

27

I don't think there's an established NoSQL backend for native mobile apps, but Couchbase Mobile is a great NoSQL database with implementations for both iOS and Android.

iOS: http://www.couchbase.com/products-and-services/mobile-couchbase

Android: https://github.com/couchbase/couchbase-lite-android

1
  • 13
    Android link is dead. And couchbase != couchDB.
    – iceman
    Sep 18, 2014 at 6:22
16

leveldb is the new kid on the block. It's a key'/value store much like BigTable, but designed for embedded devices. Their license is New BSD, which is much better than the LGPL in Tokyo Cabinet.

It's blazingly fast and build right out of Xcode.

1
  • Doesn't need to. It's C++ and trival to compile on these platforms. libz also doesn't mention iOS or Android and everybody is using it internally.
    – steipete
    Dec 18, 2015 at 15:46
11

I wouldn't be surprised if there's a Tokyo Cabinet port for mobile OSs; but seriously, what would NoSQL bring over the SQLite library already included in every platform?

  • simple semantics. it's just as easy to do key/value in SQL as it's on any NoSQL database
  • scalability. a multipetabyte-capable phone doesn't qualify as a mobile platform.
  • trivial sharding. clusters of phones aren't so popular yet
  • small implementation. tokyo cabinet source code is 4.8MB, SQLite is 4.7MB. no real gain (and it's already there).

in short, you can just use SQLite as a 'small NoSQL' if you want. it's quite fast too.

2
  • 30
    What about schema-less data models, document databases, graph data structure, multi-column databases, replication?
    – Jeff
    May 8, 2011 at 2:01
  • 5
    schema-less and document databases are little more than key-value and 'store a {XML|JSON} document in the value'. replication... on a phone? column databases are for big data (on small data and non-magnetic storage row and column databases are equivalent) graph data... that's interesting, but again, with small datasets, CPU power is vastly more than enough to do on top of record-based data.
    – Javier
    May 8, 2011 at 4:54
11

Edit:(Apr 2016)

Realm is the way to go nowadays.


If anyone is still interested, I have found this two wrappers for TokyoCabinet:

Anyway, I think LevelDB is better.

2
  • 1
    are you sure Realm is NoSql?!
    – sepehr
    May 28, 2017 at 19:56
  • 2
    Well NoSql is a quite ambiguous term, it refers to any kind of DB that doesn't store data in standard relational way. Realm is a Object Database, which fits in the profile of a NoSql database.
    – JP Illanes
    May 28, 2017 at 20:29
6

for android there's this:

https://github.com/rehacktive/waspdb

it's an alpha stage for now, but it could fit your request.

0
5

CouchDB is frequently advertised as a NoSQL DB for mobile apps because of its synchronization capabilities. Also there is a beta release of Mobile Couchbase.

4

SnappyDB seems to quite good NoSQL option for android. The read/write benchmarks against SQLite are pretty amazing.

2
  • 1
    Although snappydb is good solution but querying is quite expensive since we cannot query values as in NoSQL.We have to bring all the list into memory and apply filters to get original result, which seems quite expensive.Please do correct me Mar 27, 2017 at 8:00
  • @DRYBeliever While I do agree with you, so +1 for your comment, I do wonder whether any other embedded NoSQL solution you meant doesn't do the same internally Mar 3, 2019 at 19:44
2

iBoxDB is a high performance NoSQL database with implementations for both Android and Windows Phone. easy to use, zero configuration, copy and run.
for java android https://github.com/iboxdb/forjava
for.net windows phone https://iboxdb.codeplex.com/

0

Something new that I wrote in Objective-C is SimpleDB. It is a key/value store and can be found here: http://github.com/AaronBratcher/SimpleDB

Because the values stored must be JSON, sorting can be accomplished and specific parts of the data can be returned.

Special Features

  • Very easy to use - NO SQL REQUIRED!
  • Auto-Delete option for entries after specified date
  • No direct database interaction required to use the class - it does it all
  • All methods are class level methods, so no instance of the class required
  • Thread safe

API

+(BOOL) hasKey:(NSString*) key inTable:(NSString*) table;
+(NSArray*) keysInTable:(NSString*) table;
+(NSArray*) keysInTable:(NSString*) table orderByJSONValueForKey:(NSString*)jsonOrderKey passingTest:(BOOL (^)(NSString* key, NSString* value, NSDate* dateAdded, NSDate* dateModified));

+(NSString*) valueForKey:(NSString*) key inTable:(NSString*) table;
+(NSDictionary*) dictionaryValueForKey:(NSString*) key inTable:(NSString*) table;
+(id) jsonValueForKey:(NSString*) jsonKey tableKey:(NSString*) key inTable:(NSString*) table;

+(void) setValue:(NSString*) value forKey:(NSString*) key inTable:(NSString*) table;
+(void) setValue:(NSString*) value forKey:(NSString*) key inTable:(NSString*) table autoDeleteAfter:(NSDate*) date;

+(void) deleteForKey:(NSString*) key inTable:(NSString*) table;

+(void) dropTable:(NSString*) table;

+(dbStatus) status;
+(NSString*) guid;

Not the answer you're looking for? Browse other questions tagged or ask your own question.