Best way to access database from android

Posted by Brandon Delany on Stack Overflow See other posts from Stack Overflow or by Brandon Delany
Published on 2010-05-26T04:40:59Z Indexed on 2010/05/26 4:51 UTC
Read the original article Hit count: 319

Filed under:
|
|
|

I am working on a Android app and I have a dilemma. I have a list of Objects. I have to update each of these objects with a database. I have 2 methods:

Method 1: I can loop through the Objects. For each object I can connect to the server, update it, and then move on to the next Object, and so forth.

Method 2: I can store the Objects in a list, send the whole list to the server, update it on the server side, then return a list of updated objects.

My questions are:

  1. Which method is faster?
  2. Which method is easier on the phone's battery?

By the way, Method 1 is easier for me to code :). Thank you.

© Stack Overflow or respective owner

Related posts about java

Related posts about php