Deduplication/controlling duplicates

Hello Team
I urgently need a code that control duplicates in a database.I do not want same records in the database.Anyone with a code.Have followed the advice provided by @elmps2018 to @hissdev but am not successful
Any other help

Many many thanks

Hi @Duncan_Otieno! I am not sure there is another way than async_assign and constraints; can you tell us what the problem was with that approach?