Tuesday 11 April 2017

Mysql table design for storing locations with google places api

Search location based service is the one of the major feature in our web app,here is the table design for that.

Locations table (id,location)

Services table (id,location_id(FK locations_table),service-name).

Sample data's for tables

1.Locations table

id   location
1    kochi
2    manglore

2.Services table

  id   location_id  service_name
   1     1           service A
   2     1           service B
   3     2           service A

In order to work this with these is we need to add all the locations tolocations table. But i think i can replace with google places api,but i don't know how to link with it.



via Jabaa

No comments:

Post a Comment