I have the 4 sources of IP addresses , I want to store them in SQL Server and allow the ranges, that can be categorised by the originating country code, to be maked in an Exclusion list by country.
For this I have 2 tables.
IPAddressRange CountryCode
What I need to know is, if this data was returned to the client then cached for quick querying , what is the best way to store the returned data to query a specific IP address within the ranges. I want to know if the supplied IP address is in the list.
The reason the list is in the db is for easy storage.
The reason I want to cache then use the data on the client is that I have heard that searching IP addresses is faster in a trie structure. So , I am think I need to get the list from the db , store in cache in a structure that is very quick to search.
Any help in the A) The SQL stucture to store the addresses and b) Code to search the IP addresses.
I know of a code project solution which has a code algorithm for searching not sure how to mix this with the storage aspect.
Ideally without the use of a third party library. The code must be on our own server.