Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have recently started to built some android applications now I want to add a back-end database to my android application.
Can anyone tell me that which database to use and how to go proceed with it?
I have read lot of articles and links about SQLite, Parse, MongoDB and other relational databases.
My requirements are like number of user would be more than million and most of the data shared by the users amongst all of them would be in text only. And all the users would be related to each other.
I know there are many articles out on internet but I am not able to find one stop solution, I am a beginner in this please help me.
Thanks!
I think you meant "MongoDB." I wouldn't use MongoDB. It is not a relational database. It is a NoSQL database. If the database is going to be embedded in the application, then SQLite would be ideal. If the database is going to house the communication data of the users, then you'll need a back-end platform.
Facebook uses MySQL. PostgreSQL is ACID compliant. This has its advantages. But MySQL and Postgres would be ideal of back-end database platforms. I'm not sure if the fact that it is an Android application matters. Oracle licensing can be expensive. Installing it can be complicated. SQL Server would wed you to Windows. I think MySQL or Postgres would be the best options.
AS Propulsion said Mongo is not a relational database but I think that could be an advantage. NoSQL databases provide great advantages such as great posibilities to manage big amounts of data in the server side of your app. Another advantage is the scability that they provide. If you start an app with an small amount of data, and your app is sudenlly a great success, a NoSQL database will be easier to scale. On the other hand relational databases are often easier to use for most programmers as well almost everybody knows how to use them and of course the native solution to manage data in Android is SqlLite which is a relational database. And of course have a relational database in ayour app and a NoSQL database in your server could be a nightmare ar the moment of synchronization.
I could recomend to have a look to couchbase. It is a NoSQL database. It has a version nor mobile devices (at least Android and IOS) and a version for the server side. And for me the biggest advantage is that it can handle the synchranization of data almost automatically (wich can be very hard to program). check here http://www.couchbase.com/nosql-databases/couchbase-mobile
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
This might seem a bit crazy and it is, but its one of those things you do just because it's vaguely possible. I'm trying to host an SQL server on an old android phone of mine to be used as a personal database. Preferably Postgresql or mysql whichever is possible (I'm not worried about the difficulty.)
I've done a little digging on Google and only keep finding results for connecting android apps to SQL databases. So what I'm trying to do is host an SQL server on my old HTC one M9 and only intend to keep it isolated to localhost and my laptop would be the one device running queries to the phone. I'd keep the physical database stored on the memory card so maybe it can be moved about. Note all data stored here is only for testing and I'd just host a Postgresql database on an aws instance after the app goes live. I know there are a few free cloud providers for testing but I'm just too hipster to do that.
Any suggestions or links to get me started on my crazy idea would be appreciated. Thanks!
Since Android runs Java by definition, I would think that any Java-based RDBMS should run. I would try with:
H2 database.
HyperSQL database.
Apache Derby database.
My guess (since it's not more than a guess) is that setting up any of these just requires a JVM installed and nothing else. Since Android already has it it sounds like any of these should work.
And I have a high opinion of H2. It's a powerful engine and supports quite complex SQL.
Good luck!
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 5 years ago.
Improve this question
So I´m currently developing an App for workouts. I have Objects called Exercises, when I start a workout I fill the exercises with data, for example how many repetitions I did for each exercise. I want to collect all the data and evaluate it later. So that I can draw a diagram about how my repetitions increased over several workouts.
I´m currently saving my workouts and exercises in an ArrayList which serialize and deserialize everytime I start and close my application. It works but I think it would make more sense if I handle all my Objects and data with a database, is that right? However I have never did something with databases before and wondering where I should start. So my 1st Question is, do you know any good beginner tutorials on databases particularly for android?
As far as I understand it, the 2 options I have is to use SQLite or Firebase for my Android Application. My 2nd Question is, which one should I choose? I know SQLite is for locally storing Data. Currently I´m operating locally but I think in the future I want to support saving my data online. So Firebase might be a better choice, however the data should be accessible when there´s no internet connection.
I would appreciate any advice and explains about how databases and which to use. Links to good tutorials would be great too. Thank you!
As far as your 1st Question is concerned, it is a bit open-ended. Do you care about learning a particular Database Management System (DBMS) (e.g., MySQL, Postgres etc)? Or do you care about learning principles of database management systems? If you pick the former, then you have to pick a system, learn its syntax, and adopt it to your App's needs. On the other hand, if you pick the latter, then getting an online course on Principles on Database Management Systems is what you need to do. Personally, I believe that if you follow the first path, you will probably achieve your current goal faster, but in the future you might encounter database-related problems that you won't be able to solve. The latter will take more effort, but it makes more sense if you believe you will have to work with a database in the future.
I don't believe if it's fruitful on my end to provide any links for the following reasons: (i) the Internet is full of online tutorials for different DBMSs, (ii) I don't want to bias you on a particular MOOC that I consider good.
Turning to Question 2, I think you need to first establish your App's scenario. Is the App designed to store data locally, and those are used just by the App? If yes, then an embedded DBMS (like SQLite) is the way to go, since it will be part of your process space, the data will be manageable outside the application if needed, and it can cover all your concurrency/consistency requirements. On the other hand, if your data will be used by an external service as well, then you need a Server-based DBMS service (like Firebase).
I hope my answer helped.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I don't want to be an expert or anything, I just need the simplest local database for android applications. I'm used to Parse (not local) but as it has been taken out I need a new one.
I've come accross SQLite and Couchbase Lite. I don't like the first one and I am not sure I can use Couchbase Lite only locally, without uploading my database to the server. Which do you recommend? Which is closer to Parse?
My application will save A LOT of data, so the database needs to be light, fast and with good documentation.
Thanks!
You can use Realm.
Realm Mobile Database is an alternative to SQLite and Core Data. Thanks to its zero-copy design, Realm Mobile Database is much faster than an ORM, and often faster than raw SQLite.
In Addition, it has good documentation.
You can use Couchbase Lite purely as a local data store. It's quite capable as is, and will be adding some very powerful features in the upcoming 2.0 version.
In terms of simplicity, I find it just about equivalent to regular file i/o in complexity, for basic use.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am creating my first Android application. This will be something like a Diary or Notebook.
Andorid part is almost done and I don't know what should I do next.
Should I use data base, server....
Or can I use Drive API instead of both?
Thank you
If you're creating a note or a diary app, your better off using some sort of database, whether that's a local SQLite database on the device or a remote database.
If remote it will need some sort of web service to communicate with the database as Android doesn't support connecting to remote mysql databases such as MySQL.
Whether the database is local or remote, it doesn't matter but this would be the better option. If it is stored in the database you can store and retrieve the meta data more easily, such as creation time, title, etc whereas in Google Drive you would either need lots of files or store the data in 1 file in a particular way that you can then parse to get the meta data out.
You could however, export the data from a database and store that on Google drive that can be used as a backup/restore option.
This is a variation on the perennial rdbms vs networked filesystem approach. Many large projects I have worked with have used both, even together. Usually an RDBMS gives you more flexibility and easier development, while a networked filesystem approach works better when you are working with other tooks which expect file-level access.
The simple answer is yes you can but it probably is not worth it. You end up having to do a lot of work yourself to implement what SQLite can offer you. And in the case of Google Drive, latency will likely be a killer.
So keep your data local and fast. And work with something that gives you the flexibility you need.
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...).