GeoDataSource cities data helps users to look up the details of the city by using the latitude and longitude coordinate. With the coordinate data provided, the city information such as country, region, city and time zone can be determined effortlessly.
In order to facilitate the users to integrate the GeoDataSource cities data into any of their applications or websites, GeoDataSource has provided 2 main methods to make use of the cities data. The first method is through the GeoDataSource database which is in the form of a TSV (tab-separated values) file. Other than the database method, another option is users can choose to make REST API calls to the GeoDataSource Web Service (API service) to get the data they require.
Using the World Cities Database Titanium Edition
If you decide to use the database method, you have the option to import the TSV file into a relational database like SQL Server, Oracle, MySQL or PostgreSQL. After that, you can run the SQL queries from your application or website. There are pros and cons to this method of getting the cities data. Some of the pros and cons are listed below:
- It can be integrated easily regardless of the programming language that you are using.
- The cost is fixed.
- A relational database with proper indexing and caching enabled can perform superbly under heavy load.
- The database can be scalable depending on your infrastructure.
- The latest data has to be downloaded and imported into the database server monthly.
- Large storage space is needed for the loaded data and during the updates.
- Interruption may occur during the database update.
- Another server is required to run the relational database if you have configured it separately from your main server.
Using the Location Search Web Service
If you decide to use the REST API method, you have to call the GeoDataSource Location Search Web Service. This API returns the same cities data as you would get if you were using the databases. Like the database method, there are advantages and disadvantages to using the API method too. Below are some of the advantages and disadvantages:
- It can be easily integrated into most programming languages.
- The queries will be fast with the nearest server responding to your requests.
- No database to download, to install or to upgrade on the server side.
- No storage space is required.
- The cost is not fixed as it is a pay-per-use model.
- If the servers go down, there might be web service outages.
- The data privacy might not be compliant with regulations as the personally identifiable information is sent to various regions.
- The network latency varies based on where you are located.
In conclusion, there is no right or wrong way to use the GeoDataSource cities data. It solely depends on your application or website infrastructure, resources and requirements. Hopefully, by explaining the good and bad of each method, it will make it easier for you to decide which method fits you and your organization.