I have to perform ip address connection stats anonymously because the data posses security risk, so how do I do it?
Is it just like this, that the ip numbers and networks are replaced by random codes, and when operator is sorting out the stats, he can see the codes only?
However, the backend software has the ip numbers there, which are used to update the stats. Should I encrypt this data and generate the codes at once?
Or, I can just compress the data the way, that I group the numbers based e.g. on their country, so e.g. I would have ip number code belonging to UK "hashedipaddr" => "GB", and for this random group, multiple ip numbers would be assigned.
ALTER TABLE database DROP COLUMN ip;
Even supposedly anonymized data very often isn't. If you don't absolutely need the data, don't keep it at all.