As far as formats go, if anyone is thinking of putting together a custom database with information keyed on IP address or IP ranges, I'd encourage you to look into our MaxMind DB format:
http://maxmind.github.io/MaxMind-DB/
There are open source file readers available in many languages: https://github.com/maxmind/?utf8=%E2%9C%93&query=MaxMind-DB
There's also an open source writer https://metacpan.org/pod/MaxMind::DB::Writer
Our officially supported libraries are actively maintained and pull requests are always welcome.
I'm actually about to begin writing a blog post on how you can create your own custom databases. I'll share it on HN once it's ready.