All Country State City Database Free Download

We have Ajax based Database for all country, state and city. It's comes with Excel and Mysql. It update per year with free of cost and our script is suitable for all kind of website like Job. A list of cities of each country. Ask Question 25. Has a free list of all the cities in the world, along with their area centroid (lat/lng), as a CSV file. It is compiled from the USGS/GNIS (US) and NGA/GNS (non-US) databases. Country City Population database. Data of GDP values of cities in the world.

Full Database of city state country available in JSON and SQL FormatAll Countries, States & Cities are Covered and Populated with Different Combinations & Versions.

  1. Countries countries.json OR countries.sql
  2. States states.json OR states.sql
  3. Cities cities.json OR cities.sql
  4. Country + States countries+states.json OR countries+states.sql
  5. States + Cities states+cities.json OR states+cities.sql
  6. Country + State + Cities countries+states+cities.json OR countries+states+cities.sql

Note :

Reason behind making this repo. I ran through many websites to get perfect combinations of state, city and countries. Some was with missing states, some with large filesize. So i thought to get it done on my own using PHP Script.

All

That's all Folks. Enjoy.

Installation

The SQL file includes create statements with indexes, so simply follow the steps below to import the sql file.

Linux/OSX command line:

Free

Windows

  • Install 7zip (so you can extract gzip files)
  • Extract world.sql.gz and then use the same mysql command lines as Linux above on the world.sql file
All Country State City Database Free Download

Data Structure

Countries table

  • Size (uncompressed, in database w/ indexes): 32 KB
  • 230 records
ColumnTypeDescription
idSMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENTPrimary Key for a Country
nameVARCHAR(255) NOT NULLCountry name
codeVARCHAR(10) NOT NULLCountry abbreviation

Regions table (regions/provinces/states)

  • Size (uncompressed, in database w/ indexes): 320 KB
  • 3,888 records
ColumnTypeDescription
idINT(11) UNSIGNED NOT NULL AUTO_INCREMENTPrimary Key for a Region
nameVARCHAR(255) NOT NULLRegion name
codeVARCHAR(10) NOT NULLFor USA: State/Territory abbreviation
country_idSMALLINT(5) UNSIGNED NOT NULLForeign key to Countries table

Cities table

  • Size (uncompressed, in database w/ indexes): 272 MB
  • 2,790,951 records

All Country State City Database Free Download For Windows

ColumnTypeDescription
idINT(11) UNSIGNED NOT NULL AUTO_INCREMENTPrimary Key for a City
nameVARCHAR(255) NOT NULLCity name
region_idINT(11) UNSIGNED NOT NULLForeign key to Regions table (States for USA)
country_idSMALLINT(5) UNSIGNED NOT NULLForeign key to Countries table
latitudeDECIMAL(10,8) NOT NULLCity Latitude
longitudeDECIMAL(11,8) NOT NULLCity Longitude


License for MaxMind WorldCities Database

OPEN DATA LICENSE for MaxMind WorldCities and Postal Code Databases

All Country State City Database Free Download Windows 7

Copyright (c) 2008 MaxMind Inc. All Rights Reserved.

All advertising materials and documentation mentioning features or use ofthis database must display the following acknowledgment:'This product includes data created by MaxMind, available fromhttp://www.maxmind.com/'

Redistribution and use with or without modification, are permitted providedthat the following conditions are met:

  1. Redistributions must retain the above copyright notice, this list ofconditions and the following disclaimer in the documentation and/or othermaterials provided with the distribution.
  2. All advertising materials and documentation mentioning features or use ofthis database must display the following acknowledgement:'This product includes data created by MaxMind, available fromhttp://www.maxmind.com/'
  3. 'MaxMind' may not be used to endorse or promote products derived from thisdatabase without specific prior written permission.

THIS DATABASE IS PROVIDED BY MAXMIND.COM ``AS IS' AND ANYEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL MAXMIND.COM BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED ANDON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THISDATABASE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.