Solution to Prevent Duplicate Entry

You can check this thread for a concept.