free country, city database for sql server [closed]
Asked Answered
R

9

23

have anyone used this before, i need free country, city, IP database for sqlserver

Roxana answered 7/3, 2009 at 5:9 Comment(0)
N
10

ipinfodb provide free geolocation data for MySQL. With a simple database translator, you can put it into different database, since the table structure is simple. They also provide data in CSV format, that will be easier to imported to different database engine.

The data is based on free version of MaxMind, and it's updated every month. They also provide free API, if you don't want to store the data in your server. The accuracy is decent and enough for normal website usage.

Nitty answered 13/1, 2010 at 13:18 Comment(1)
they no longer provide the dbBases
P
13

I have used http://www.maxmind.com/app/geolitecity . It is a less exact version of their paid database. The free database claims to be "over 99.5% on a country level and 79% on a city level for the US within a 25 mile radius". You can see their accuracy detailed at http://www.maxmind.com/app/geolite_city_accuracy.

The data is presented as a CSV file containing the starting IP block, ending IP block, and the location. It is easy enough to load into sqlserver.

APIs in C, C#, PHP, Java, Perl and the free version, GeoLite, has an IPv6 version in addition to the downloadable CSV Format.

Prelature answered 7/3, 2009 at 6:29 Comment(0)
N
10

ipinfodb provide free geolocation data for MySQL. With a simple database translator, you can put it into different database, since the table structure is simple. They also provide data in CSV format, that will be easier to imported to different database engine.

The data is based on free version of MaxMind, and it's updated every month. They also provide free API, if you don't want to store the data in your server. The accuracy is decent and enough for normal website usage.

Nitty answered 13/1, 2010 at 13:18 Comment(1)
they no longer provide the dbBases
J
8

If you need to find the location of the current user based on their IP address, then you could try the Google Geolocation API, in particular google.loader.ClientLocation.

Check out the Google API docs for more info: http://code.google.com/apis/ajax/documentation/#ClientLocation

Jube answered 7/3, 2009 at 5:21 Comment(1)
+1 'cause that's right, but in my experience it very often has no idea where you're from. At least it tells you when it doesn't know. Seems to be better IDing residential things than commercial.Ligament
D
3

You can find the Mysql Database from here too...

https://github.com/baraskar/Worlds-Country-State-and-City-Mysql-Database

Suggestions always welcome...

Daleth answered 26/9, 2014 at 6:43 Comment(0)
D
1

Check this free world cities database http://www.sudostuff.com/world-cities-database-8.html

Includes city, region and country.

MySQL format file to download with three tables, country, region and City. Country schema

CREATE TABLE IF NOT EXISTS `country` (
`countryId` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`code` VARCHAR(5) DEFAULT NULL,
`name` VARCHAR(150) DEFAULT NULL,
PRIMARY KEY (`countryId`)
) ENGINE=InnoDB;

INSERT INTO `country` (`countryId`, `code`, `name`) VALUES(1, 'ad', 'andorra');
INSERT INTO `country` (`countryId`, `code`, `name`) VALUES(2, 'ae', 'united arab emirates');
INSERT INTO `country` (`countryId`, `code`, `name`) VALUES(3, 'af', 'afghanistan');
INSERT INTO `country` (`countryId`, `code`, `name`) VALUES(4, 'ag', 'antigua and barbuda');
INSERT INTO `country` (`countryId`, `code`, `name`) VALUES(5, 'ai', 'anguilla');
Domash answered 8/7, 2013 at 10:2 Comment(0)
L
1

Not exactly for SQL Server but for MySQL, I suggest, you to checkout this GitHub repository:

https://github.com/turalus/openDB

Lidless answered 1/3, 2017 at 9:26 Comment(0)
A
1

Geonames is free data but lots and lots of data. You need a DBA to cleanup the data. But it is one time effort to clean the load the data as per your requirement. I ended up with a 1.3 GB file size after zip extraction and loading this data to DB also requires a good powerful hardware.

maxmind data is very old and they have stopped updating the free data that the provide

Then there are many paid data sources but listing the least costly and good one that I used sometime back world cities database from http://www.worldcitiesdatabase.com which is at reasonable cost.

Then you can look at maxmind paid data services as well but they are very costly unless your budget is very good.

Hope this helps.

Astred answered 12/7, 2018 at 12:41 Comment(0)
B
0

See this

http://www.flagip.com

Bullpup answered 7/8, 2011 at 14:10 Comment(0)
L
0

See database here -

http://myip.ms/info/cities_sql_database/World_Cities_SQL_Mysql_Database.html

They have countries / cities ddatabase for Microsoft Sql Server. Here code -

CREATE TABLE countries (
  countryID varchar(3) NOT NULL,
  countryName varchar(52) NOT NULL,
  localName varchar(45) NOT NULL,
  webCode varchar(2) NOT NULL,
  region varchar(26) NOT NULL,
  continent varchar(15) NOT NULL,
  latitude float NOT NULL,
  longitude float NOT NULL,
  surfaceArea float NOT NULL,
  population int NOT NULL,
  PRIMARY KEY (countryID),
  UNIQUE (webCode),
  UNIQUE (countryName)
);


CREATE TABLE cities (
  cityID int NOT NULL,
  cityName varchar(50) NOT NULL,
  stateID int NOT NULL,
  countryID varchar(3) NOT NULL,
  latitude float NOT NULL,
  longitude float NOT NULL,
  PRIMARY KEY (cityID),
  UNIQUE (countryID,stateID,cityID)
);
Lauranlaurance answered 7/4, 2013 at 0:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.