2

I'm building a new application for android and this would need to send and retreve data from an online database. Firstly is this possible or is it a completely wrong approach? Would i be able to tell my application to set certain data into the server and retreve other? Does it create security risks by which anyone would be able to access the database? It's my first time dealing with anything close to databases so i'm still learning. Is there any website i can use which sets up an accessible SQL database? Thanks for your help!

3 Answers 3

1

The Good approach for this is that you should create REST (Representational State Transfer) API on server and perform CRUD operations in your Android app using that API.

There are a lot of security problems with embedding direct database access into your app.

Usually,REST architecture is very useful to build client/server network applications. REST basically works on HTTP protocol and implementing REST is very simple compared to other methods like WSDL etc.

There are many good tutorials available on implementation of REST API that you can easily find by Googling it. Here's one of them: http://www.androidhive.info/2014/01/how-to-create-rest-api-for-android-app-using-php-slim-and-mysql-day-12-2/

Sign up to request clarification or add additional context in comments.

Comments

0
  • Yes, it is possible and it is not the wrong approach. Web services/REST API's are some things you should look at.

  • There are obvious security risks associated with having an outward facing web service or database. OWASP has a pretty good web services guide that should get you started with the security. You will need to address these risks prior to holding any sensitive/user information. There are plenty of guides online.

  • A couple of database hosting suggestions Amazon Web Services if you want it to be manage dfor you or create a VPS at Digital Ocean (or similar) website if you want to do it yourself.

Due to the open ended nature of this question there are numerous ways you can address these problems. I recommend spending a lot of time researching and analyzing them prior to starting the project and deciding on a technology.

Comments

0

This is not a wrong approach, most of the Android application send or receive data from online databases.
For connecting your Android app with the online database you can make of webservices , for instance you can create Rest Api for this.
For creating Rest Api using Asp.net web api visit this link The answer for your last question would depend on the way your write your web services decide the security risk.

You can also use this reference

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.