Coupling Logic Programming with Relational Databases

Sabrina Silva

October 2005


The declarative nature of a logic programming language and the ultra-efficient data handling capabilities of database systems provides an outstanding reason for coupling the two systems. However, such a merge can be of a tenuous nature, often having to deal with certain obstacles. Coupling approaches between these two systems have seen a great amount of research, mainly on the strategies used to establish connections between them.
With this research we aim at developing three alternative coupling approaches for distinct forms of communication between both the systems. We propose an initial approach where tuples from the relational database are asserted as logic programming facts. The second approach consists in accessing database tuples through backtracking. The last approach transfers unification from the logic programming language to the relational database engine with the use of a Prolog to SQL translator .
The results in this thesis show that it is possible to couple a logic programming system with a relational database which combines the following three aspects: simplicity, performance and efficiency. This combination, together with the optimization obtained from view-level accesses and indexing can prove to be an interesting solution.


  author =  {S. Silva},
  title =   {{Coupling Logic Programming with Relational Databases}},
  school =  {University of Porto},
  address = {Portugal},
  month =   {October},
  year =    {2005},
  type =    {{MSc Thesis}},

Download Thesis

PDF file