Replaced deprecates database queries by newer ones