Question:
How to create a database for a mobile app?
lusus_vir
2012-01-23 12:20:00 UTC
For example, if I wanted to create an app for movie reviews, how would I create a database to store people's reviews? This isn't my actual app idea, but this example is close enough that your answers would apply.

I need to know:
1. How to build a database (what service, language, etc)?
2. Best way to collect the reviews (from a website, someone else's database, etc)?

I'm not looking for you to solve the problem for me. Just give me some things I can go research. I know java, javascript, and am learning html/css. I have no clue about databases. I've looked around at MYSQL, not sure if this is relevant.
Three answers:
Jim Maryland
2012-01-23 12:32:49 UTC
MySQL and MS SQL Server seem to be popular for low cost hosted solutions. If you are hosting the application on your own hardware, the database options increase, but so does the cost. The database itself shouldn't matter outside of setting up your drivers and data source configuration in your application.



As for setting up the schema itself, that is very dependent on your applications and would be pretty difficult to explain in Y!A format. At a minimum, you'll want tables for login credentials. You'll probably want one to maintain the items that are being reviewed and one to contain the actual reviews. If you go with intermediate linking tables, that's an option to consider as well.



"How to build a database (what service, language, etc)?"

- SQL (Structured Query Language)



"Best way to collect the reviews (from a website, someone else's database, etc)?:

- You'll need to write custom collector code to gather from other sites. Unless the site(s) are using a standard format, you'll need a custom collecter per source site.

- From other databases, first the host would need to expose a connection to you. If doing this over the web, I highly doubt they'd give you direct database access so more likely you'll go through some sort of web interface (web service, RESTful service, JSON, etc...).
2016-03-02 02:15:16 UTC
Guess it depends on your application. If the application is only run on the mobile device (no web component) then a full database is overkill for storing the scores. You wouldn't want a full database running on the mobile client. Now if you are making a web based application, then your server could certainly use a database (SQL Server if you have the appropriate license for an Internet deployment). For the text file to track the scores, depends again on how your game model is setup. If you are keeping say the top 10 scores, your file could simply be a comma delimited file with 10 lines that you update. ,, ,, ... ... ,, You would read the values when you plan to display the high scores and/or after a game completes to see if the current game beats a high score. If the current score beats one, insert at the appropriate location in the array holding the read in values and have a chunk of code that simply outputs the new high score file. Alternatively to a text file, consider a simple XML file (not sure if the phone SDKs tend to include a parser or not). ** Edit ** @Semper VI - I wouldn't be surprised if MySQL ran on Android. Probably not an ideal setup, but I'm sure someone with a bit of free time and some curiosity has ported it. ** Edit 2 ** I agree that a database in this case isn't necessary. People have done some pretty odd things though, just to prove it could be done. I did forget about HSQLDB, which probably would be better if a database was absolutely needed. I'm wondering what method Android/iPhone/WinPhone use for storing contact information. I know Android syncs up with gmail contacts, but I'm guessing they cache it local to the phone as well.
2012-01-24 05:53:53 UTC
Mobile apps are hot today. But hiring a developer is too expensive. I used snappii.com to make apps. It's really easy, the web service allows to make mobile apps in minutes, and without programming skills at all.


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