I’d say it’s not recommended.
1. Not everyone has CPF
How to do it with foreigners? And minors who do not already have CPF? In these cases they can not create account?
2. CPF generators
Imagine that someone was creating an account on any site and for mistrust or even for malicious intention such people decided not to use their own number of CPF and picked up a number of CPF through a generator. One fine day the real CPF number holder decides to create an account on the site, obviously it will be prevented because the system will inform you that there is already an account attached to that CPF. How to resolve such a situation?
I’m not saying it’s impossible to solve, but you’ll be creating extra complexity just because you didn’t want to use an auto increment as the primary key and decided to use the CPF.
3. Same user cannot have multiple accounts
Is there any excellent reason not to let the user have two accounts? You have no longer allowed the child to have an account, nor will you allow the parent to have two accounts (one for him and one for his child, for example). Maybe he takes Grandma’s number, or he uses a generator (Sigh).
4. And if the user cannot recover password?
Suppose the user has created an account and never accessed again, after a while he tries to access it again, but he does not remember the password and also lost the password or changed e-mail. You will need an extra plan to recover the user’s password and maintain exactly the same account that he created at first.
Again, I’m not saying it’s impossible, but it’s an extra complexity that you’ll have to develop, while you could just let the user create a new account.
5. How to handle change of ownership?
Suppose a Sky subscription for example, if one day I want to transfer ownership without having to cancel the current account, return the device, sign a new account and receive a new device. How to do?
Okay, you can change the PK and use triggers or whatever, but it’s again another extra complexity in your system.
6. What is the advantage of using CPF as PK?
Unless you have an excellent reason, the only "advantage" I’ve thought of so far is: save a field on the table.
I wouldn’t use it, and I wouldn’t recommend it. In the case of the CPF for example, sometimes two people with the same number appear. It’s rare, but it happens. Ex http://g1.globo.com/fantastico/noticia/2014/02/mulheres-descobrem-que-alem-de-nomes-iguais-tem-o-mesmo-cpf.html
– adamasan
I understand that was an "Example", as put, is not the doubt on CPF... We can imagine a system where no one cares about registration that doesn’t have your number. I have worked with similar demand, magazine, that to exist needed to have a ISSN... CPF and ISSN are good examples of Urns guaranteed by a Authority control. In this context I see an interesting question.
– Peter Krauss