1

I have a Django application that sits atop a MySQL database. Actually the database is MariaDB. But Django doesn't know that. As far as it is concerned, it's just MySQL.

My application needs to keep track of peoples' home addresses and run a query to find all addresses within a fixed distance from a certain coordinate. I guess I need to use GeoDjango to deal with this kind of spatial data.

My question is: do I need to switch from MySQL to PostgreSQL to do such queries? I have read that MySQL cannot do radius queries properly (it can only do bounding-box checks). Also, What is PostGIS and do I need to use it? For what?

Saqib Ali
  • 11,931
  • 41
  • 133
  • 272
  • 2
    Are your coordinates in lat/lon (4326) and what other queries can you envisage running. Read this post, http://stackoverflow.com/questions/3743632/gis-postgis-postgresql-vs-mysql-vs-sql-server, especially my answer :D (shameless self-promotion) and then come back if you have any more questions. – John Powell Jul 22 '14 at 16:35
  • 2
    Postgis is an extension to Postgres to support spatial types and various spatial operations. Postgis has vastly more spatial functionality than MySQL, but if you are already running MySQL, it will be adequate for certain kinds of queries, but you need to give more details of expected queries, if you could. – John Powell Jul 22 '14 at 16:37

0 Answers0