True Language-Level SQL Debugging
The authors demonstrate Habitat, a declarative observational debugger for SQL. Habitat facilitates true language-level (not: plan-level) debugging of, probably awed, SQL queries that yield unexpected results. Users may mark arbitrary SQL sub-expressions|ranging from literals, over fragments of predicates, to entire sub-query blocks|to observe whether these evaluate as expected. From the marked SQL text, Habitat's algebraic compiler derives a new query whose result represents the values of the desired observations. These observations are generated by the target SQL database host itself. Prior data extraction or extra debugging middleware is not required.