Before inserting into the database, I\'m using the following code to check for duplicates. To me, a duplicate is only considered a duplicate when name, de
You can still run into race conditions where 2 users try to insert dups at the same time, checking for dups using a select statement simultaneously gives both users the go ahead to insert their records. I prefer to set unique index on the DB and then catch the error that bubbles up from the DB.