Using jdbc in android

Of all the tutorials I came across to connect to an external database from android, most of them use a php program on the server and use httppost to pass arguments. Why don't people just connect directly to the database using jdbc. Or is there some other point that I am missing here.


source to share

1 answer

In the mobile world, there is no such thing as perfect reception, so you get dropped calls and missing data when the user navigates and gets a good reception. The JDBC protocol is not designed to handle the full / partial disconnection that happens on mobile devices, especially when you are in the middle of a request. HTTP, on the other hand, at least allows you to create in its own retry mechanism, since a failed HTTP request is just a failed HTTP request and not an exception thrown from the network layer / JDBC driver.

Also, when you are communicating on the public internet (even over SSL), the data entering your server should at least be verified in some way before it reaches the database.



All Articles