13

I am developing an app which is supposed to send data to a MySQL DB in a remote server so as to be later displayed in a webpage that grabs the data from that server, and I was wondering if it's possible to use some NoSQL solution instead of MySQL?

I have been reading about CouchDB and MongoDB but I still don't understand if I could use them for my purposes, as for example with MongoDB, I have to install the app on the Android phone and I still have no clue how I can install it in a remote server.

Community
  • 1
  • 1
noloman
  • 11,411
  • 20
  • 82
  • 129
  • 1
    possible duplicate of [MongoDB on Android](http://stackoverflow.com/questions/6887887/mongodb-on-android) – Gates VP Aug 04 '11 at 18:16

4 Answers4

6

CouchBase Mobile is probably what you are looking for. I don't think there is an equivalent solution for MongoDB yet, and it's not really what it is designed for anyway.

EDIT: But what is wrong with the MySQL option?

dee-see
  • 23,668
  • 5
  • 58
  • 91
  • do you know if is it possible to install it in the Android emulator – noloman Aug 04 '11 at 13:54
  • Haven't really looked into it, but the [Couchbase Mobile for Android](http://www.couchbase.org/get/couchbase-mobile-for-android) page should answer your questions. They have a video tutorial to get your started. – dee-see Aug 04 '11 at 13:58
  • uh great, I didn't see neither of those pages.. thanks a lot! – noloman Aug 04 '11 at 14:01
  • does android inbuilt Sqlite has any option of this kind? remote synch? –  Aug 04 '11 at 18:49
  • @Vache there is nothing wrong, but I was just wondering if it would be better for my case: I want a bunch of Android phones to send data to a remote MySQL server through PHP, and I was wondering if it would be easier/more efficient to use CouchDB for this. – noloman Aug 05 '11 at 10:50
2

iBoxDB for Java can install in the Android emulator,hava an interface called 'IBoxRecycler' , it can collect database's data(byte[]) , then convert data to sql, and replicate to server. if server also iBoxDB, just send data don't need convert

for (OPEntity k : BoxData.getActions()) {
  String tableName = k.TableName;
  Map<String, Object> v = k.Select();
  String sql = ( tableName, v ) to SQL;
  SendToMySQL( sql );
}

https://github.com/iboxdb/forjava

Bruce
  • 51
  • 1
0

A new kid on the block is JasDB. It has an exceedingly simple API and works on Android. Examples:

create object

SimpleEntity entity = new SimpleEntity();
entity.addProperty("title", "Title of my content");
entity.addProperty("text", "Some big piece of text content");
bag.addEntity(entity);

range query

QueryExecutor executor = bag.find(QueryBuilder.createBuilder().field("age")
   .greaterThan(10).field("age").smallerThan(30).sortBy("country"));
serv-inc
  • 35,772
  • 9
  • 166
  • 188
0

There is also

https://github.com/neo-expert/thingdb

It is very lightweight (~50 KB) The API is MongoDB-like:

DB db = new DB("./db");
Doc doc=new Doc();
doc.put("name","test");
doc.put("age",31);
db.insert(doc);
//later you can get the saved doc:
Doc d=db.findOne(eq("name","test"));

You can also create Indexes:

db.createIndex("fieldname");
neoexpert
  • 465
  • 1
  • 10
  • 20