Feasibility Conditions and Preference Criteria in Querying and Repairing Inconsistent Databases