I'm going to be importing a table of IP address ranges, with the addresses being 32 bit numbers.Of course they'd fit into a 32 bit int, but then I'd have to deal with negative numbers when the high bit is set, or something like that.Alternatively, I could just call the fields decimal for the sake of simplicity. How bad would that be?Assuming I go with the int solution, the schema will be something like this:start_num int NOT NULL,end_num int NOT NULL,various_attribute1 int,various_attribute2 varchar(50),various_attribute3 varchar(50)
...*every* lookup against this table will be in the form:select various_attribute1,various_attribute2,various_attribute3 from IP where @iLookupIP between start_num and end_num
...Am I correct in thinking that the primary key should be on start_num and end_num? Or would using seperate indexes make more sense?I appreciate any thoughts!-b