Anagrafe, stato civile e elettorale