You can mechanically do what you envision. And you can maintain anonymity by storing only a hash of the user's credential, just as a password. You can see if the credential's hash exists in the table, but you cannot recreate the credential from the hash.
But what credential can you use to ensure the user only answers the survey once? It's all too easy for users to create alternate identities so they can fill out multiple forms if they were so inclined. You can make it marginally difficult by limiting one survey per IP address, or one survey per MAC address. Those are easy to get around as well, in addition to being unrealistic. There can be multiple people per IP or MAC. Or multiple IPs and MACs per person. The only credentials that truly identify someone is something they would not give up easily, and even so, you have no way to verify it still.