Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: storing IP addresses

Re: storing IP addresses

From: Dogan Cibiceli <dcib_at_gwl.com>
Date: Tue, 01 Jun 1999 17:07:15 -0600
Message-ID: <375467A2.719F59E5@gwl.com>


Sam Petitto wrote:

> Are there any IP addresses that begin with a "zero" ?
> What data type should I use to store IP addresses ?
> One of the main functions of the DB I'm building is to store
> and mine through these to look for hit patterns by IP address.
> I'm using 8i on NT
>
> TIA
>
> --
> Sam Petitto
> Database Engineer
> N.S.T.I.
> 703.561.0420
>

Use a 4 field integer and index on each field :) Assuming size of IP address is a lot . (speed is also main concern) If not just store a varchar2 and index on that. Also what r u gonna search for. Each IP address can have a different netmask ( belong to a subnet). If u want, u can just store the starting IP number and the number of PC's on that subnet (32, 64). Then you can really shrink your table. And you can search between those two values. For example 185.34.36.32 and there are a max. of 32 pc's. Then you would have one row that marks start -end IP numbers.
 Depends on each situation. Pick whichever you want to go.

D Received on Tue Jun 01 1999 - 18:07:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US