checking for same hash in dataBase