I'm working on a website where users will be able to register and provide information about their location. In order to prevent users from inputting incorrect data, we don't want users to provide free-text information but instead choose from predefined values as much as possible. We believe there are 2 ways of providing those values: use an
API to an external service provider or create your own
-accuracy and completeness of data.
-no maintenance related to update of data as this it taken care of by API provider.
-easier/faster to get started (no need to create local database, just implement API).
-degradation of performance when availability issues with external API.
-outage due to changes to the external API (until your code is updated to reflect those changes).
-lock-in with external provider.
-no external dependency: improved stability and performance.
-more work to get started (you need to create the database and code to interact with it).
-risks of inaccurate/incomplete data, either initially or over time.
-more maintenance work to keep database up to date.
Assuming the depth information requested from users is as follows:
-country: interested in value. also used to narrow down list of regions.
-region (state in the US, county in the UK...): not interested in value itself, only used to narrow down list of cities.
-city: interested in value (which can be used to work out related region should we need regional statistics).
-address: interested in value although OPTIONAL.
Which option (whether
local database) would you choose? What tips you would give for the implementation? What other resources can you share?