2004 · 11 citations · 16 references
ComputingComputer ScienceInformation SystemsDatabasesLogicProgramming LanguagesDatabase ManagementError DetectionQuery ProcessingRelational AlgebraRelational Data ModelStructured Query LanguageConsistencyConsistency CheckDatabase Management SystemsLogical SemanticsRelational Database SystemsRelational Query LanguagesSemantic Consistency Checking
Abstract. Checking the consistency of query conditions is an old problem, and there are already many proposed solutions. Since the problem is in general undecidable, there is not a unique best one. However, for conjunctions of comparisons, it seems that the method of Guo, Sun, and Weiss (1996) is the state of the art. In this paper, we show how it can be extended to handle many cases of subqueries (and also null values). In this way, the consistency of a surprisingly large subset of SQL can be decided. We apply this consistency check to the task of finding semantic errors in SQL queries. In particular, we discuss possible runtime errors in SQL queries and show how a test for such errors can be reduced to a consistency check. We believe that future database management systems will perform such checks and that the generated warnings will help to develop code with fewer bugs in less time. 1
16
On conjunctive queries containing inequalities
Anthony C. Klug · Journal of the ACM · 1988 · 296 citations · Full text