免费国家,城市数据库的sql服务器

时间:2020-12-31 19:19:01

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

以前有人用过这个吗,我需要免费国家,城市,IP数据库的sqlserver

8 个解决方案

#1


9  

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.

ipinfodb为MySQL提供免费的地理定位数据。使用一个简单的数据库转换器,您可以将它放入不同的数据库中,因为表结构很简单。它们还提供CSV格式的数据,以便导入不同的数据库引擎。

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.

数据基于免费版本的MaxMind,每个月更新一次。如果不想在服务器中存储数据,它们还提供免费的API。准确性是体面的,足够正常的网站使用。

#2


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.

我使用了http://www.maxmind.com/app/geolitecity。这是他们付费数据库的一个不太精确的版本。这个免费的数据库声称“在一个国家层面上超过了99.5%,在半径25英里以内的城市层面上超过了79%”。您可以在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.

数据以CSV文件的形式呈现,包含启动IP块、结束IP块和位置。加载到sqlserver非常简单。

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

在C, c#, PHP, Java, Perl和免费版本的api, GeoLite,除了可下载的CSV格式之外,还有一个IPv6版本。

#3


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.

如果需要根据当前用户的IP地址查找当前用户的位置,那么可以尝试谷歌地理定位API,特别是Google .loader. client location。

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

查看谷歌API文档获取更多信息:http://code.google.com/apis/ajax/documentation/#ClientLocation

#4


0  

See this

看到这个

http://www.flagip.com

http://www.flagip.com

#5


0  

See database here -

看到数据库,

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

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

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

他们有针对Microsoft Sql Server的国家/城市ddatabase。这里的代码,

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)
);

#6


0  

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

查看这个免费的世界城市数据库http://www.sudostuff.com/worldcities.database -8.html。

Includes city, region and country.

包括城市、地区和国家。

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

MySQL格式文件下载与三个表,国家,地区和城市。国家模式

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');

#7


0  

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

你也可以在这里找到Mysql数据库……

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

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

Suggestions always welcome...

建议总是受欢迎……

#8


0  

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

不是SQL Server而是MySQL,我建议您检查GitHub存储库:

https://github.com/turalus/openDB

https://github.com/turalus/openDB

#1


9  

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.

ipinfodb为MySQL提供免费的地理定位数据。使用一个简单的数据库转换器,您可以将它放入不同的数据库中,因为表结构很简单。它们还提供CSV格式的数据,以便导入不同的数据库引擎。

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.

数据基于免费版本的MaxMind,每个月更新一次。如果不想在服务器中存储数据,它们还提供免费的API。准确性是体面的,足够正常的网站使用。

#2


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.

我使用了http://www.maxmind.com/app/geolitecity。这是他们付费数据库的一个不太精确的版本。这个免费的数据库声称“在一个国家层面上超过了99.5%,在半径25英里以内的城市层面上超过了79%”。您可以在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.

数据以CSV文件的形式呈现,包含启动IP块、结束IP块和位置。加载到sqlserver非常简单。

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

在C, c#, PHP, Java, Perl和免费版本的api, GeoLite,除了可下载的CSV格式之外,还有一个IPv6版本。

#3


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.

如果需要根据当前用户的IP地址查找当前用户的位置,那么可以尝试谷歌地理定位API,特别是Google .loader. client location。

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

查看谷歌API文档获取更多信息:http://code.google.com/apis/ajax/documentation/#ClientLocation

#4


0  

See this

看到这个

http://www.flagip.com

http://www.flagip.com

#5


0  

See database here -

看到数据库,

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

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

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

他们有针对Microsoft Sql Server的国家/城市ddatabase。这里的代码,

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)
);

#6


0  

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

查看这个免费的世界城市数据库http://www.sudostuff.com/worldcities.database -8.html。

Includes city, region and country.

包括城市、地区和国家。

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

MySQL格式文件下载与三个表,国家,地区和城市。国家模式

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');

#7


0  

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

你也可以在这里找到Mysql数据库……

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

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

Suggestions always welcome...

建议总是受欢迎……

#8


0  

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

不是SQL Server而是MySQL,我建议您检查GitHub存储库:

https://github.com/turalus/openDB

https://github.com/turalus/openDB