Android - guidelines - app with online database [closed] - android

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I want to create an app that is based on the data stored on remote database.
What i have in mind is to use a VPS i have to store the database. Then the app will, on demand, access (and update) the data on the database.
How should i set up my VPS in order to do that? Right now i just have a MYSQL server running.
Edit: I want to know what are the best practices i should follow in order to have an android app based on an online database.
Can i access the db directly from the app?
Do i need anything
besides the database server to assist the communication of the db and
the app?
Should i use, for some reason, another db instead of mysql
(faster,more secure, easier to connect)?
I am new to this and i would like some general guidelines.
Thanks.

Can i access the db directly from the app?
As far as I know, no you still cannot access MySQL directly from Android. It has been a year since I did Android development, but you will most likely need something sitting in between (like a RESTful service, see http://phprestsql.sourceforge.net/).
How to access online mysql database in android?
how to access external mysql database in android?
Do i need anything besides the database server to assist the communication of the db and the app?
Yes. See answer above.
Should i use, for some reason, another db instead of mysql (faster,more secure, easier to connect)?
That is up to you. There are some NoSQL solutions that offer a RESTful interface built in (I think CouchDB does this, MongoDB, etc...).

Related

Starting steps to build a Database access through web/android app [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 months ago.
Improve this question
Very simple question here; I want to have a database that can be access through the web and through an android APP.
What are the steps that I should take? Is there any good tutorial? I am far from professional in this field and looking for a very simple guidance to where to start.
Should I use an SQL Database and React?
Thanks
You have to chose if you can have direct access to the database (insecure) or if you want to access it over a API.
Access with API
You can create an API, with which you can access the data of your database. You will find alot of examples and tutorials on the internet. Example: Create a Restful API
Make a server-client application
You can create a server, which is running on a hosting or server-pc, which then queries the database and returns the result to the client.
With Next.js you can setup such a application easy. Next JS Website
Direct connection
If it doesnt matter that users have direct access to database, you can directly connect to the database.
First you need a package, which can access a database. You can decide if you want to make simple queries to the database or if you use a ORM-mapper, which can make data-access easier.
Database Access Packages
MSSQL
MySQL
Mongo DB
ORM
Type ORM
Install one of these packages and query the database.

The optimal way of storing data from an android list, then exporting it to sync with a master database [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm basically creating an android application which takes around 8 forms (forms consist of EditText field and CheckBoxes) and will store them in a database, so that it can be later synced/added to a pre-existing database (Microsoft SQL 2008).
Which would the best way to store and sync (maybe daily or weekly) data to a pre-existing database in my case. I do not have much experience in android backend, as I've only ever worked with shared preferences to store data locally, so a simpler solution will ease this process. Cheers!
Edit:
TLDR: This question was asked to find out, which route shall be taken when one needs to store data taken from a form filled by the user so that it can be later synced with an existing database (which in my case is a Microsoft SQL 2008). The main aim of the android application was get the various databases and push it to the cloud.
As of 24/1/17: I've created a SQLite Database and have begun storing the data, I'm still not sure which method would be the best to export the data. I will keep on documenting the progress.
You could look at azure cloud services link, you need some knowledge about odata.
or
You could try firebase link, understanding of json is required.
Because you have knowledge about sql I suggest you have a look at some tutorials for linking sql with azure or sqlite with azure.
Use a POJO and store them to firebase. Check this and this or watch this video. hope it helps.

Using SQLite or SQL with PHP [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I am working on an android project that uses an offline database. When it is connected to internet, the database should be updated. Another one of my requirements is that the database should be able to connect to SAP. Which database is better to use? SQLite or SQL with PHP? Any suggestions?
Assuming you want to create a database on a server, you should probably go with MySQL (SQL is the query language, MySql is one of the most widely used database engines). According to this thread, SQLite will only support one writer at a time and is not mean for "enterprise level" data management. However, it is faster and has less overhead, so if you did need a db on your mobile application, I would go with SQLite
SQLite is a lightweight version for mobile so it is the best choice for an offline mode.
Firebase is used to store data online and sync them with every connected clients.
See firebase.google.com
There is a Getting started section for Android, iOS and web platforms.

Database for Android App [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
How and where I can maintain my DB for my android app. I know we can use sqlite DB for android apps but, I don't have any idea of Storing the DB at some other location and then accessing it on the app.
Example Structure:
I want to know, where and how we can have DB at some different point of location, Do I need to buy space or rent? Or there are any other ways (Having DB Server at my own Desktop and accessing it via IP address. Will there be any difficulties or dependencies) I believe we can access it by creating a connection to the Db and writing queries to fetch by using Http Get and Post or Put methods.
If yes, then can we use SQL Server Management studio 2008 or what would be the simplest & the best to work with.
Use parse.com as a backend services.Easy to use and simple. follow this answer
Use realm, please.
https://realm.io/
It is much easier comparing to sqlite.
You can check the usages at https://realm.io/docs/java/latest/

Best practice selecting database for mobile app [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
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!
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.
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..

Categories

Resources