Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best practice selecting database for mobile app [closed]

So, I am fairly new to mobile app developing. Are currently making project documents for a mobile app, and I want some input on what database solution I should use.

1) mobile app -> online only -> talking to a database

2) I Have several webservers up and running (mysql mostly), possible to use?

So my question is simple :) What solution should I use for my mobile app database. - Setup a mysql database on a server? - Use some kind of cloud based solution? - Any API considurations?

  • need to be "best practice" for both android and ios.

Any and all suggestions is much appreciated! Thanks all! You are AWESOME!

like image 678
Tom Avatar asked Dec 12 '13 10:12

Tom


2 Answers

Tom,

The most common solution for this problem is:

1) Your application get data via a webservice in your server. You can use Soap solution based on XML communication, or simple REST access (simple http request in GET or POST method) and use your own choice: XML or JSON. Today, there is a lot of solution based on REST GET/POST with JSON file communication.

2) After, if you want that your application can turn in offline mode or just be more reactive, you can store old loaded data by webservice in local database. For this, in Android you can use direct access to sqlite database, and in iOs, you can use the CoreData api.

Hope it help you.

Fabecc.

like image 80
Fabecc Avatar answered Sep 21 '22 04:09

Fabecc


Tom - If you need data to be available offline without internet connectivity then you should you SQLITE database which comes as part of android/ios.

If your app saves the data on server which in turn is used by other portal or other devices (sharing) then consider storing data via web/server and mysql database.

So really it depends on the usage and sharing requirements. Storing data locally has much benefit because it is faster, no network required, data always available, and not using network also increases battery life..

like image 41
TorukMakto Avatar answered Sep 23 '22 04:09

TorukMakto