The problem of handling massive amounts of data received much attention in the research related to the development of efficient Database Management Systems (DBMSs). In this scenario, a mounting wave of data intensive and knowledge based applications, such as Data Mining, Data Warehousing and Online Analytical Processing have created a strong demand for more powerful database languages and systems. This led to the definition of several data model extensions, new language constructs, and various database extenders, to enhance the current capabilities and expressiveness of DBMSs. A grate effort in this direction has been carried out with the introduction of a new standard for SQL, namely SQL99 which provides, among other features, support to object oriented databases and recursive queries.

However, the adoption of SQL99 is still far from being a “standard”; in fact almost all current DBMSs do not fully support it and, in some cases, they adopt proprietary (non standard) language constructs and functions to implement parts of it. Moreover, the efficiency of current implementations of SQL99 constructs and its expressiveness are still not sufficient for performing complex reasoning tasks on great amounts of data.

Complex reasoning capabilities can be provided by logic-based systems. In particular, Deductive Database Systems (DDSs) are advanced forms of database management systems whose storage structures are designed around a logical model of data and inference modules are designed on logic programming systems. DDSs not only store explicit information in the manner of a relational database, but they also store rules that enable inferences based on the stored data. Using techniques developed for relational systems in conjunction with declarative logic programming, deductive databases are capable of performing reasoning based on that information.

However, current DDSs perform their reasoning tasks in main memory. This significantly limits the amount of data they can handle contemporarily and does not fit with typical database applications requirements, where the amount of data is sufficiently large that much of it must reside on secondary storage. Efficient access to this data is, then, crucial to achieve good performance. Unfortunately, the interaction of current DDSs with external (and independent) DBMSs is not trivial and, in several cases, not allowed at all. DLVDB provides a contribution in this setting, bridging the gap between logic-based DDSs and DBMSs.

DLVDB is an extension of the well known logic-based system DLV which:

  • provides flexible and easy interfaces with external databases;
  • takes full advantage of the well assessed optimization techniques implemented in the current DBMSs for improving reasoning efficiency;
  • introduces a query evaluation strategy which reduces to the minimum the exploitation of main memory resources during the reasoning tasks.

DLVDB allows for two typologies of execution:

  • Direct database execution, which evaluates logic programs directly on the databases, with a very limited usage of main memory; it is capable of handling massive amounts of data but with some limitations on the expressiveness of the queries (normal stratified programs are supported).
  • Main memory execution, which loads input data from different (possibly distributed) databases and executes the logic program directly into the main memory; in this case disjunctive datalog is fully supported. It allows to take full advantage of both the expressiveness of disjunctive datalog and the DBMS capabilities of storing and accessing massive amounts of data, but with some limitations on the quantity of data to reason about contemporarily, given by the amount of available central memory.

In both cases, interoperation with databases is provided by ODBC connections; these allow to handle, in a quite simple way, data residing on various databases over the network.




DLVDB (latest release March 23th, 2012)
GNU/Linux i386 version GNU/Linux x86-64 version Windows version
dlvdb_unixlike.tar.gz dlvdb_unixlike_x86-64.tar.gz

Licence: DLVDB is free for academic and non-commerical educational use, as well as for use by non-profit organisations. For the full license and further information for commercial use, run DLVDB with the option -license.


Work in Progress

The system will support disjunctive rules and unstratified negation soon.

Basic (and currently stable) version of the system:

  • G. Terracina, N. Leone, V. Lio, C. Panetta, Experimenting with recursive queries in database and logic programming systems, Theory and Practice of Logic Programming (TPLP), 8(2), 129-165, 2008. (Paper listed in the Computing Research Repository (CoRR) – – CoRR number: 0704.3157)

Advanced features (support of disjunction, external functions, and more)

  • G. Terracina, E. De Francesco, C. Panetta, N. Leone, Enhancing a DLP System for Advanced Database Applications, Proc. of International Conference on Web Reasoning and Rule Systems (RR’08), 119-134, Karlsruhe, Germany, 2008, Lecture Notes in Computer Science, Springer.

Relevant Applications

  • M. Manna, F. Ricca, G. Terracina Consistent Query Answering via ASP from Different Perspectives: Theory and Practice, Theory and Practice of Logic Programming (TPLP). Cambridge University Press, UK. To Appear. (Available on-line at
  • G. Ianni, A. Martello, C. Panetta, G. Terracina, Efficiently querying RDF(S) ontologies with Answer Set Programming, Journal of Logic and Computation (Special issue). 19(4), 671-695. 2009. Oxford University Press. Oxford. (An extended version of this paper is available here as Technical Report)