Accessing online databases

  • Replies:3
iaindownie
  • Forum posts: 4

May 12, 2010, 5:49:02 PM via Website

Anyone know if it's possible, practical and safe to access an online database through an Android App?

We have a database that is accessible through a web browser (using JDBC), but I'd like to collect observations in a form on an Android App, store this in a local database, and then from a menu item, upload directly into the web database.

To store data over the web, the user has to login with username and password, so we would want the same level of security when passing these data over HTTP or such like.

Ideally I'd like to call some data from the online database to populate a dropdown menu too, but I haven't managed to get this to work either.

Iain

Reply
Deactivated Account
  • Forum posts: 5,136

May 12, 2010, 6:52:36 PM via Website

Douglas Carter
http://www.xda-developers.com/

They are probably more knowledgeable in that subject matter, but maybe someone here can give some advice.

For sure someone can Douglas :)

@jaindownie

First of all, dataconnections via mobile internet connections are as safe as they are if done with a normal PC with internet connection.

By default, you won't have the ability to make JDBC connections. There is no API for this build in Android.

What you can do is writing an Android App which will connect to a certain host via SSL connection (to gain security) and then collect data via some sort of webservice for example. This would in fact presume, that you have a server-side application wich will take your request, processes it, gain the required information from the server-side database and delivers the queryed information back to your Android device. Here you can do everything with these data, store them in a database or file .. whatever you like to do.

Summed up you will need some sort of client server application. One part running at your host the other on the Android device.

No matter how you do this .. security depends on the implementation of both parts. Server and client!
It's just up to you, how you retrieve and deliver the data

Hope my answer was helpfull for you even if my english is not that good.

— modified on May 12, 2010, 6:53:32 PM

lg Voss

Reply
Roderick Barnes
  • Forum posts: 4

Oct 21, 2011, 5:55:14 AM via Website

hey bro,

you have probably heard all of the lines about why you should not use JDBC to connect to a remote database. i will not continue harping there. you might do well to work with JDBC-based ResultSet objects that are returned from web services. I do just that using WebRowSet implementations. Only the XML is transferred over the wire and the document is turned into a ResultSet object again on the Android device. I write about this in my blog. Here are two blog entries that may help:

http://roderickbarnes.com/blog/droid-chronicles-web-services-handling-complex-parameters
http://roderickbarnes.com/blog/the-droid-chronicles-an-android-webrowset-implementation-bifrowset

I hope this helps.

In His grip by His grace,
Roderick L. Barnes, Sr.

Reply