Remove duplicate database entries