archives

Explaining database query or constraint-satisfaction failures

Let's say that you have a logic database (or a relational database, or a constraint store, etc.) and the user issues a query that returns no results. It would be nice to be able to explain to the user why the query failed, perhaps identifying some subset of clauses that are mutually unsatisfiable or suggesting modified constraints. It looks to me like most of the work in this area takes the same approach as this paper by Parke Godfrey, finding maximal subqueries that succeed and minimal ones that fail and proceeding from there. (Judging from the citations to Godfrey's paper, this has been a hot topic in recommendation systems lately; I am surprised that it hasn't, as far as I can tell, caught on more generally in the constraint or logic programming communities -- although there may be some related work using different names for the same concepts.)

The capacity to explain failures and guide the user to a successful query seems awfully useful. I'm wondering if anyone is aware of (1) any other approaches for suggesting modifications to failing queries, or (2) any general-purpose constraint solving toolkits or logic programming systems that offer this functionality.