Inconsistency and incompleteness in relational databases and logic programs