trigger checking for duplicate data