Database security check