We investigate classes of SQL queries which are syntactically correct, but certainly not intended, no matter for which task the query was written. For instance, queries that are contradictory, i.e. always return the empty set, are quite often written in exams of database courses. Current database management systems, e.g. Oracle, execute such queries without any warning. In this project, we explain serveral classes of such errors, and develop algorithms for detecting them. Of course, questions like the satisfiability are in general undecidable, but our algorithm can treat a significant subset of SQL queries. 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.
Christian Goldberg:
Do You Know SQL? - About Semantic Errors in SQL Queries
TLAD 2009 (BNCOD 2009), Birmingham, United Kingdom
[PDF]
Stefan Brass, Christian Goldberg:
Semantic Errors in SQL Queries: A Quite Complete List
Elsevier's Journal of Systems and Software, 79(5), 2006
[Postscript] [PDF]
Stefan Brass, Christian Goldberg:
Proving the Safety of SQL Queries
5th Intern. Conf. On Quality of Software, Melbourne, Australia, 2005
[Postscript] [PDF]
Stefan Brass, Christian Goldberg:
Semantic Errors in SQL Queries: A Quite Complete List
4th Intern. Conf. On Quality of Software, Brunswick, Germany, 2004
[Postscript] [PDF]
Stefan Brass, Christian Goldberg:
Detecting Logical Errors in SQL Queries
16th Workshop On Foundations Of Databases, Monheim, Germany, 2004
[Postscript] [PDF]
Stefan Brass, Christian Goldberg, Alexander Hinneburg:
Detecting Semantic Errors in SQL Queries.
Technical Report, Universität Halle, Institut für Informatik, 2003.
[Postscript] [PDF]
(This paper is still being updated from time to time ...)
Stefan Brass: Databases 1, final exam, University of Halle, Winter 2008/09.
Exam evaluation: [PDF]
Stefan Brass: Databases 1, final exam, University of Halle, Winter 2005/06.
Exam evaluation: [PDF]
Stefan Brass: Databases 1, final exam, University of Halle, Winter 2003/04.
Exam evaluation: [PDF]
Stefan Brass: Databases 1, midterm exam, University of Halle, Winter 2003/04.
Exam evaluation: [PDF]
Kai-Uwe Sattler: Databases 1, final exam, University of Halle, Summer 2003.
Exam evaluation: [PDF]
Annemarie Herrmann: Practical Database Programming: SQL Traineeship, final exam, University of Halle, Summer 2003.
Exam evaluation: [PDF]
Kai-Uwe Sattler: Databases 1, final exam, University of Halle, Winter 2002/03.
Exam evaluation: [PDF]
Stefan Brass: Documentation and Databases (Introduction to Databases), final exam, University of Giessen, Summer 2002.
Exam evaluation: [Postscript]
[PDF]
Stefan Brass: INFCSI 2710 Database Management, Final Exam, University of Pittsburgh, Spring 2000.
Exam: [Postscript]
[PDF]
Solution and evaluation: [Postscript]
[PDF]
SQLLint 0.3 prototype (27.04.2005), developed by Stefan Brass 2004/2005:
[prolog program] [example input file] [zipped test files]
Very short manual: Runs with SWI-Prolog.
This program reads the table definitions from CREATE TABLE statements in the input file (see example input file).
Old prototype of the Consistency Check, developed by Elvis Samson 2003: [prolog program]
Very short manual: Runs with SWI-Prolog. Consult file with "[prototyp]." Then type "run.". Enter an SQL (all lowercase) that refers to the tables defined at the end of the program (can easily be exchanged):
Finally, end the Prolog system with "halt."
CG, Halle a.d. Saale, 29.08.2009; 15:53:09 |