The Datalog Educational System (DES) is a free, open-source, multiplatform, portable, Prolog-based implementation of a basic deductive database system. DES 2.7 is the current implementation, which enjoys Datalog, Relational Algebra and SQL query languages, full recursive evaluation with memoization techniques, full-fledged arithmetic, stratified negation, duplicates and duplicate elimination, integrity constraints, ODBC connections to external relational database management systems (RDBMSs), Datalog and SQL tracers, a textual API for external applications, and novel approaches to hypothetical SQL queries, declarative debugging of Datalog queries and SQL views, test case generation for SQL views, null values support, (tabled) outer join and aggregate predicates. The system is implemented on top of Prolog and it can be used from a Prolog interpreter running on any OS supported by such interpreter. Moreover, Windows, Linux and MacOS X executables are also provided. See also Key Features. We have developed DES aiming to have a simple, interactive, multiplatform, and affordable system (not necessarily efficient) for students, so that they can get the fundamental concepts behind a deductive database with Datalog, Relational Algebra and SQL as query languages. SQL is supported with a reasonable coverage of the standard for teaching purposes. Supported (extended) relational algebra includes duplicates, outer joins and recursion. Other deductive systems are not fully suited to our needs due to the absence of some characteristics DES does offer for our educational purposes. This system is not targeted as a complete deductive database, so that it does not provide persistency, transactions, security, and other features present in current database systems. The most relevant enhancement in current release is the addition of an extended relational algebra processor. It includes all the original operators but division, and extended operators for dealing with outer joins, duplicate elimination, recursion, and grouping with aggregates. Syntax follows WinRDBI [Diet01], so that in particular all of its examples run straight on DES. Another useful improvement is a new switchable multi-line mode, allowing entering inputs which span over several lines. This applies to both the command prompt and the processing of batch files, and it is enabled with the command /multiline on. Supported SQL language has been extended a bit with new clauses for DDL statements, as well as for metadata information. Parsing of Datalog and SQL files and inputs has been enhanced: it now runs faster and appropriately handles operators. Column and relation renamings in SQL statements have been revisited and several issues have been solved. The complete list of enhancements, changes and fixed bugs are listed in Section 11.1 of the user manual. A novel contribution implemented in this system is a declarative debugger of Datalog queries [CGS07,CGS08], which relies on program semantics rather than on the computation mechanism. The debugging process is usually started when the user detects an unexpected answer to a query. By asking questions about the intended semantics, the debugger looks for incorrect program relations. See Section 5.7 of the user manual for further details. Also, a similar declarative approach has been used to implement a SQL declarative debugger, following [CGS11b]. There, possible erroneous objects correspond to views, and the debugger looks for erroneous views asking the user whether the result of a given view is as expected. In addition, trusted views are supported to prune the number of questions. See Section 5.8 for further details. In addition, following the need for catching program errors when handling large amounts of data, we also include a test case generator for SQL correlated views [CGS10a]. Our tool can be used to generate positive, negative and both positive-negative test cases (cf. Section 5.9 of the user manual). |