Avoiding Query Errors with Partial Database Availability