I am working on Android app for locating food places in my city. Using Google Map v2 api.

App shows user his current location, and the closest food spots around him.

I want to store location coordinates in an online database, and App should retrieve data in JSON format from db to phone. I am familiar with PHP and MySql.

Which database should i use to store locations ? Is MySql good for that purpose ? How will i store location data in it?

1 Answer 1


If you are 100% sure that requirements are not going to change, and you just need to store the coordinates of the points, then yes, go ahead and save the data in a MySQL database, as two double columns.

But if there is even a little chance that the scope can increase, then I'll suggest that you spend some time setting up a PostGIS database and save the data in it as Geometric points.

Most projects suffer from feature-creep, and before you know it, you will have to do Geometric operations in the database, like getting points in a certain polygon, or finding distances and so on. If your data is in a PostGIS database, all of this will be very simple.

  • Wow, great answer thanks. there will be more features. map markers, distance to locations ... Will investigate PostGis as you suggested.
    – pedx
    Feb 17, 2014 at 11:38
  • I wonder if these 2 different datapoints and a uid would happily live in Redis. Another great thread: stackoverflow.com/questions/29979085/…
    – Cmag
    Apr 11, 2017 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.