I have a custom object with these attributes.
id (key), name and email
And I'm trying to make sure that these attributes are unique in the database.
How to prevent successful put / create / save operation in case of any of the non-key email and name attributes already exists in the database?
I have a tblUsers table, with one key attribute being id . Then I have two globally secondary indexes, each of which also has one key attribute, which is email for the first index table and name for the second.
I use the microsoft.net authentication framework, which itself checks for existing users with a given name or email before creating a user.
The problem that I foresee is the delay between checking existing users and creating a new one. There is no security that multiple threads usually do not create two users with the same name or email.
source share