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: modelling IPv6 as a number

Re: modelling IPv6 as a number

From: Geoff Muldoon <geoff.muldoon_at_trap.gmail.com>
Date: Wed, 13 Dec 2006 10:51:52 +1100
Message-ID: <MPG.1fe9eba6ab83d03d9898bd@news.readfreenews.net>

andy_at_andyh.co.uk says...

> <geoff.muldoon_at_trap.gmail.com> wrote:
> >maxwell.dana_at_gmail.com says...
> >
> >> If I'm not mistaken, IPv6 requires 39 significant digits to represent
> >> each possible IP as an integer. Oracle's maximum is number(38). Has
> >> anyone devised a scheme to store the integer value of IPv6 in oracle?
> >
> >Why ever would you store it as a number? It isn't an attribute to which
> >you can naturally apply *numeric* functions, adding two IPv6 addresses
> >together doesn't make much sense. Store it as a string.
>
> One situation where the fact that an IPv4 address is a number shows up is in
> netmasks, for working out subnets and broadcast addresses. Presumably there are
> some similar operations that still apply to IPv6 addresses?

subnet ~ substring

My general rule: if you add two values together and the result is meaningless, it's not a number, it's a string.

Using that rule I win most arguments about also storing values such as phone numbers and postal/zip codes as strings instead of numbers.

Geoff M Received on Tue Dec 12 2006 - 17:51:52 CST

Original text of this message

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