I'm trying to create a Users table that only has OpenId registrations, exactly like StackOverflow.
I'm storing in the table
- OpenId Identifier (their login name)
- Alias (which is the display name to show to the public)
- Some other openId stuff
So… I want to make sure that there is only ONE user in the system that has the openId identifier and only one alias.
Of course, I can change my alias at any time. I could also change my openId identifier at any time. I need to make sure that these are unique / only exist once.
SO… Do I create TWO unique key indexes for the table, or one unique key index with both fields in it?
Cheers 🙂
Best Answer
One for each of them.
If you'd create just one that contains both you could have - for examlpe - two users with the same alias, as long as they have two different OpenIDs.
However: