I know there\'s already a lot of questions on this topic but I might have a few extra questions.
I want to store IP addresses in a database (single column if possibl
I may store it in binary. An IPv6 address is 128bit -> 16 bytes long. If you store IPv4 address, you should store it at the last 4 bytes. When you use this field in application there are many built in options to convert from IPv6 to text and text back to IPv6 binary.
In IPv4 case: this address type has its first 80 bits (10 bytes) set to zero and the next 16 bits (2 bytes) set to one (0xFF), while its last 32 bits (4 bytes) are filled with the IPv4 address. The stack implementation usually differs, so you should make the conversions at client side (from IPv6 to IPv4). This address space is safe, so it is reserved for IPv4 addressing.
More info and more info.