Regarding Database on Android - android

Is it possible to store data directly to the database without having the user input something in it. I am planning on creating a school updater which updates students regarding school news and such. What confuses me is that how can I store data directly into it. Im not that good on servers so Im resorting into databases but Im confused where to start.
Thanks a lot!

Do you want to store data in a remote database? If yes, you may want to use REST-APIs/Webservices and process the data on the remoteserver.
You should not (except Databases like CouchDB) connect your device directly to any remote remote device for security reasons.
Anyway, you may create a local SQLite database on your device and synchronise the data using REST.

Related

How to make changes to sqlite database for app that is installed in multiple devices?

I started developing an app that uses sqlite that is to be installed on multiple devices and any updates done on sqlite database from any device are to be reflected in other devices as well. I have researched a little and found that Sqlite DB is local to a device and changes done in one device are not reflected in others and for that I have to use external server. Is there any way around it?
Is it optimal to directly store data in external server or use sqlite and sync it regularly with external database?
Thanks in advance
As far as I know, there isn't a way without an external database. I would recommend you to sync it regularly with an external database.
Checkout this question for more information how to do that:
How to sync SQLite database on Android phone with MySQL database on server?
Answer of Andrew White
Create a webservice (REST is probably best) and serialize your SQLite/MySQL data and PUT/POST/GET it to/from your web service. This will give you a nice layer of abstraction in case you decide to switch from MySQL to something else server side.
You will achieve your goal using external server. It's not necessary to create your own server, just use data store services like Parse. For more look here.
You can use data directly from external server or cache them on your device first (sqlite, prefs, json etc.) – it's up to you.

Storing and fetching data in database

What I need the app to do is to store data in a database and let any user fetch the data. I am not sure how SQLite works but from what I know is that it is server-less. With the database being serverless, how do multiple users, other users, access the same data if it is not stored on a server?
look for backend and a service - parse.com or similar.
SQLite is installed on all android systems, and any app which wishes to create and use a database may do so. This however, is only stored locally on the device.
If you wish to share and synchronize data across multiple devices, that is a different issue all to itself. Indeed it will very likely involve a central server somewhere along the line.
Perhaps start your reading at d.android.com

android database to oracle database

Can someone give me an idea or point me in the right direction about following matter:
I need to make android app that will do some things with remote oracle database (take some data, insert some data, ...).
I can do that, but the trick is, app owner needs to be able to do that offline (because he doesn't have internet everywhere), then when user connects to internet, somehow transfer those offline changes in local android database to oracle database.
I never did something like that.Any pointers?
Should I make same database structure in android database like that remote oracle database?Then somehow synchronize changes?
Or is it done some other way?
Thanks for any help.
If you have the ability, it would be best to create a RESTful application on the server that listens for your app to contact it. Then it would take the data (send it from your app via JSON, XML or any of several other popular formats) and operate directly on the Oracle database by doing the adds/inserts/deletes there.
You can do the same thing on the way down - your app contacts the server, the server provides data from the database in the form of JSON, XML, etc and your app can then operate on it's own internal JAVA objects of data.

Can SQLite and MySQL work in one android application?

I am currently creating an android that will use SQLite offline and MySQL when the mobile phone in connected in a network or intranet.
Is it possible? If not can you suggest other methods?
Thank You and appreciate the help
You're describing a distributed database. The pattern that works best in this case is to ensure your app goes uses the local SQLite database for all data presented to the user. You don't want your app to be waiting for MySQL data - the user might decide to walk into an elevator and lose coverage, or whatever.
Use a background thread to keep the MySQL data synchronized with your local SQLite data, and use notifications to tell the app when new data is available for display.

Database communication related to Android Development

I have a simple question for you, What if I want to develop an Android Application which uses a database for storing the data and retrieving those data, I know that there is an option to use SQLite, as I know SQLite is something which stores the data in a device , or you can say within a system somewhere, what about if I wanna store some data from one device and retrieve those data from another device?? I mean what is the best way of having a single Database which will communicate with all the devices? to be clear, using SQLite it seems to me like more as a local database not a global.
Thank you!
Lulzim

Categories

Resources