Checking dtabase for risk