Best (safest) way to connect Android App to an online database - android

I will need to connect my Android App (which is being programmed on Android Studio) to a database. What I don't know, and Google is not giving any good answers, is how should I connect this App to a database. I'm looking for a safe way of receiving and sending data.
The options I know are: MySQL database, REST database and SQLite (but SQLite is an offline database, so it is not what I'm looking for).
Any help will be appreciated.

There are many online database that are 'safe' to connect to, MongoDB, Azure, AWS, Firebase, Oracle databases etc. The best one will depend on which bests suits your application. And all these are safe at least to the extent that depends on the providers, you also need to make sure your implementation is safe and best.

Usually the data transfer between an android application and any relational database is done using api. The api can be written using any server side languages like php, java, javascript using node, python etc. You can also connect to firebase firestore or other non relational databases. The choice is yours. For example, if your system is mainly doing read action and not that much write action then you can go with non relational database like MongoDB. If it has a lot of write action then choosing relational database like MySQL, PostgreSQL will be good.

Related

What SQL databases are used in Android to build a simple app with a login system?

I'm trying to build an Android app where the database is on the server side.I hear that SQLite is a local database so it doesn't really work for what I'm trying to do.
In java I would use JDBC to connect to MySQL and send requests normally.
In PHP too it's almost the same thing.
The app needs a login system and all of that...
How can I do this in Android ?
Android does not support MySQL out of the box, but you can implement it.
Probably the SQLite you heard about, in the Android environment, refers to Room, the standard to save persistent data locally on the device.
In the mobile world, often a good option (if they fits for you) are NoSQL databases. There are plenty, hosted services like Firebase, DynamoDB or open source like MongoDB, Supabase.

Creating Android Apps with MongoDB

How can I create an android app that uses a mongoDB database locally i.e. Clients can make CRUD operations without connecting to a server. Sort of how SQLite is used, except this time I wanna use mongoDB.
I have checked around and what seems to be my most suitable option is using mongodb java driver, but the problem is how and what am I connecting the mongoClient to? Do I have to sort of start a server or something?
I would suggest using firebase or realm or something that comes with better native mobile support. Couchbase Mobile might be of interest too, but I have not used it. https://developer.couchbase.com/mobile

Oracle database mobile server vs Couchdb

Solely looking at it from a mobile database point of view which is going to synchronize with a remote server,assuming it doesn't really matter if it is relational db or NoSQL,
what would be the better option to go along with?
Client platform is android
My vote would be for CouchDB.. The reason being, as NoSQL, it has good number of advantages. More than anything, you can make the user's data available offline.
Just in case you want further info on usage of CouchDB, I would like to request/suggest you to go through this, this and this.
I want to point out that Oracle Database Mobile Server also makes the data available offline, that's what it's designed to do. In addition to syncing your mobile database, it also offers device mgmt. For more info:
http://www.oracle.com/technetwork/products/database-mobile-server/overview/index.html
I've not used the Couchbase solution, but I do know some of the team over there, and they seem like very smart people.
What it comes down to: if you want/need an Oracle backend, then you should use Oracle Database Mobile Server. If you want to experiment with NoSQL, then Couchbase would be the way to go.
Eric Jensen,
Oracle PM

android application with database in the cloud(internet)

we are designing an application for android which has to store the details which the end users give ,into the database in the internet or cloud, where all the admins can access the same database for checking purpose through another application specially designed for checking with that common database. is it possible?
if so what is the database i have to use for?
where i have to host my database?
since there will be more number of users querying at the same time i cant use sqlLITE, so what else i hav to use?
guide me since am a noob in web apps development.
guide me since am a noob in web apps development.
Ahh - cos what you need is exactly a web app.
The web app has a DB in the background, and makes a number of URLs available that your android app can call over the network. These URLs read or write data to the DB. Since anyone could call those URLs you need to pay great attention to security.
As for what to write this in, it could be anything. PHP, Python/Django or whatever. For your DB, you probably don't want to use SQLite for the scalability problems you mention - instead MySQL or Postgresql maybe. There are literally thousands of hosts that might be suitable, depending on what language you use.

What to choose in terms of database for an Android app

I am trying to create an Android app similar to google latitude and I am not sure what to use in terms of databases. I thought of using SQLite (which is serverless), but I still need a server in order to make two clients communicate to each other. I am really new with connecting an app with a server or a database, so any help would be appreciated.
I dont believe there is a way to remote connect to any database from Android (could be wrong, but when I check it wasnt possible). Your going to have to use SQLite for your local, and i recommend using MySQL for the server side, and use JSON to retrieve information via a service page.
OK, what you want to do is a client-server architecture. You need to think about what kind of data you want to store, and where to do that.
Obviously, on the server side, you need to store data. It will depends what your server is, and what technology you use for it. This question has nothing to do with Android, as you'll probably communicate to your server using HTTP or another protocol that would allow it to communicate to your android app (the client) and maybe later on, to different kind of clients (web app, iOS, etc.). So you can use any database technology, Oracle, MySQL, Postgres, whatever. You can even build your server application using Microsoft .NET technology, or anything else. You're not tied to Java / Android (although my personal technology stack of choice would probably be a Jetty HTTP server, Oracle database or MySQL if you want lighter, and Java of course).
On the client side, you may also want some data storage, and in this case it depends on the size and complexity of what you want to store. For simple key-value pairs, use SharedPreferences. For more complex data structures, SQLite is your technology of choice.

Categories

Resources