Can You Use MySQL as a Data Store for a Mobile App?

There's a local mobile database server available.
I think it's called SQL-Lite? Never used it myself though.
 
Yeah it can. Most likely using the same php scripts in place already.

Only thing without knowing what you're doing/how it's built we can't say for sure.

I had completely forgotten about SQLite. I'm not sure if it's still the case but unless it's a static database every data change/update would require a new update for the app. It wasn't ideal in many situations.
 
I just need the mobile app to retrieve data from the MySQL database. I know how to do this for websites, but I've never tried a mobile app, and was wondering how different it was.

Rgds
 
I just need the mobile app to retrieve data from the MySQL database. I know how to do this for websites, but I've never tried a mobile app, and was wondering how different it was.

Rgds

Most hosts wont allow external access directly to the database. You'll probably need to do it through a web service or something running on your website.
They might set it up for you if you ask though?
 
I use JSON to php for my mobile app connections. Or if that would require you mucking around with current website phps you could use httprequests just as easily.

Still depends on how the site is set up.

Edit: I thought direct access to DBs was a big no no :confused:.
 
Last edited:
Direct access to the DB is a bad idea. You would need to create some intermediary service to act as the bridge between the DB and the mobile app. A common one is a JSON-based REST API. The app queries the web service, which in turn fetches the requested data from the database (after checking it's allowed!!).
 
As said above a REST API is the way to go. It's a doddle in ASP.Net using WebApi, I'm sure someone will already have made a similar PHP framework to make things simple for you.
 
There's a bit of conflation going on here.

What are you looking to store? If it's just stuff like the app's preferences, then no, you don't want to be connecting over the wire to a remote DB.

If it's stuff that will be accessed on different devices and should be the "same" data, then yes you'll want a remote DB.
 
Back
Top Bottom