Question:
What database works best for a mobile app.?
Stephen
2018-06-17 15:41:13 UTC
I am developing in app for a company to navigate multiple office parks. The app would be on windows or android tablets.
The goal is for it to have a database showing who is in which office space.
These can constantly be changing so it has to be updated remotely.
Some tablets might share the same listings.
We would prefer no server hosting, an embedded database with remote access would be best.
My question is, what database system would work best. SQLite is embedded but cannot be accessed remotely.
We have worked with door entry systems (Such as ones made by DoorKing or Linear) where the box is screwed in, the network is configured, and it is accessed to the IP/Port remotely.
Any advice on which database would be best would be appreciated.
Ten answers:
Isabella
2018-10-24 12:18:31 UTC
Mobile OS is growing bigger and bigger and recently Android mobile OS surpassed Windows OS as the most used Operating System in the world. As mobile OS is growing larger and hardware as powerful as any normal computing device
Mujtaba
2018-09-04 10:02:20 UTC
SQL Lite with best performance.
sds
2018-07-09 09:14:41 UTC
Top mobile app uses database



SQLite

Realm DB

ORMLite

Berkeley DB

Couchbase Lite
Robert J
2018-06-22 06:41:12 UTC
As others have said, for the overall system to work as described you need a shared database that it universally accessible.



The simplest way to do that is have a hidden URL on a web server, either one dedicated to the system or just an extra "page" on some existing web site.



The app on a device sends it's info and requests for data as a web page request (always the same page URL no matter how many users), with the data being sent as "post" parameters.



The web page code it addresses just returns the appropriate data in a suitable format (ej. JSON) rather than sending an actual html web page. Teh app gets and uses the data as required.



You write the "page" in PHP to interpret the data requests (with some form of security) and transfer data to/from a MySQL database on the web server.



You only create the PHP code and database once, then each device that accesses it with valid security has matching records added to the database table(s) by the PHP code.



It's a very common way of sharing data between multiple app users and works very well, as long as you think out the data exchange protocol carefully when setting everything up.



You must use some form of non-trivial security coding in the requests so that any random request to the web page URL is ignored, or better still returns a fake web page or a 301 redirect to a different site, so no one can mess with the "real" data storage system.



eg. as a concept, JSON encode then take a CRC32 of the data you are going to send as a request then use a fixed re-arrangement of the byte order before eg. bas64 coding and sending the request.



The PHP code reverses the sequence, unpacking base64, reversing the byte swapping and checking the CRC before accepting it as valid and extracting the data from the JSON string.



That (or whatever you actually implement) means only _your_ app, that has the correct encoding, can ever extract data from the database.



I've used similar principles in apps I've written. The server code / database needs no maintenance or interaction no matter how many users, once it's written and debugged.
Peter H
2018-06-20 16:29:02 UTC
Think about it. If you have a database which has to be accessed from multiple locations then it has to live on a server. If you use a mobile device as a server then unless it is within a wifi network area you will need to communicate over the mobile phone network and you will be using up your year's data allowance in days.
Andy T
2018-06-19 09:32:49 UTC
Google's own developmental documentation says SQLite, and it should already come with each Android. Just investigate how Windows 10 version of it fits.



I do not think there's much choice in the matter. But with no server individual devices got out of sync pretty soon. Or do you mean there is a server spitting out raw data somewhere in your IT department?
peter
2018-06-18 12:43:34 UTC
SQLite is relational DB, a lighter version of SQL designed for mobile. It is an in-process library that implements a self-contained,to SQL database engine. It is an embedded SQL Database for separate server process, unlike any other SQL database.
Daniel B
2018-06-18 01:02:16 UTC
Trying to do this without a server really doesn't make sense. If you didn't have a server then the only way to update the local database would be to download a new copy of the app each time you wanted to update the database. You are better off creating a server that holds the data, and then have the app periodically connect to the server to download a local copy. You wouldn't need a table for every tablet, just one table that all the tablets read from. If each needs different data then add a field to the table to indicate which tablet the data is for.
husoski
2018-06-17 17:15:49 UTC
You might want to clarify what you mean by "We would prefer no server hosting". If the database is on one device, and everyone goes there for access, then that device is a database server by definition. Is it that you don't want hosting of that server outside of your intranet? (For both privacy and security reasons, that's a good idea.)



The simplest designs for a multi-user app will all have a custom application server that all users connect to. With that general design, the client side of the application never needs to see the actual database; and you can choose anything that works well on the system where the server runs.



From that view, what's the problem? If one database system has issues, you can choose another; and only a small portion of server code will be affected.
?
2018-06-17 15:59:10 UTC
That sounds creepy as hell, i certainly wouldn't wanna work in that office.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Continue reading on narkive:
Loading...