http://smil.exblog.jp/7861992/
http://www.google.com/search?hl=ja&q=IP%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9+%E5%9B%BD+mysql&lr=
http://www.nminoru.jp/~nminoru/memo/ip-address/what_country_from.html
PostgrSQLにはinet型というのがあるらしい
http://www.mono-space.net/blog/pgsql/e070511_ipaddress.htm
http://www.postgresql.jp/document/pg721doc/user/datatype-net-types.html