Prolog, deductive databases, and SQL 
Author Message
 Prolog, deductive databases, and SQL

I've become increasingly persuaded that combining Prolog's declarative,
logic programming approach with the ability to query databases
would be a powerful tool in my work.  This amalgamation is of course
a major research area - that of developing deductive databases -
but as I am a geographer, not a computer scientist, I would like
to know about existing successful implementations of this strategy
rather than research issues.  A particular example where I see using
this approach might be generating a landscape classification for
regions in a geographic information system using rules that are
far more complicated than can easily, if at all, be expressed
using the simple relational database inherent in the GIS.  
The questions then I have are:

    1) Most of the commercial implementations of Prolog offer interfaces
to certain relational databases (Oracle, Ingres...) through SQL.
Does anybody have any experience with these?  How easily or clumsily
do these work?  What sort of performance limitations are associated
with these?

    2) Does there exist any public-domain code that can generate
SQL queries from Prolog?  In other words, is the interface between
Prolog and the SQL RDBMS a feature only to be found in commercial
implementations of Prolog?

    3) What is out there in terms of deductive databases that
integrate these two areas more tightly than through the Prolog-SQL
approach?  I've heard of CORAL; are there any other systems
that I should be aware of, either public-domain or commercial?

    4) Finally, what have I left out, in terms of other solutions?
To take one thought, assuming the Prolog implementation offers decent
clause indexing, it should be possible to read a small or medium-sized
table directly in as Prolog clauses.  But when does this become
unwieldy, say in Quintus or BIM Prolog?

Thanks,

Allan Hollander
Dept. of Geography, UC Santa Barbara



Tue, 15 Aug 1995 05:49:49 GMT  
 Prolog, deductive databases, and SQL

Quote:

>       2) Does there exist any public-domain code that can generate
>   SQL queries from Prolog?  In other words, is the interface between
>   Prolog and the SQL RDBMS a feature only to be found in commercial
>   implementations of Prolog?

>       3) What is out there in terms of deductive databases that
>   integrate these two areas more tightly than through the Prolog-SQL
>   approach?  I've heard of CORAL; are there any other systems
>   that I should be aware of, either public-domain or commercial?

The very first deductive database prototypes are NAIL! from Stanford and
LDL (Logical Data Language) by MCC. The LDL system was released several years
back and has been in active experimental use in many research and industrial
institutions (our shareholder company) in the US, Europe and Israel.
The second generation, called LDL++, with many enhancement,
has been under development for the past 2-3 years and was released in late
1991 to both shareholder companies and US universities.

The LDL++ system is currently available to all US universities for

(MCC reserves the right to accept or refuse any requests).

There is also a book on the LDL language called "A Logical Language for Data
and Knowledge Bases" by S. A. Naqvi and S. Tsur printed by W. H. Freeman, 1989.

There are also several research deductive database prototypes that have been
released recently, including ConceptBase from Germany, Aditi from Australia,
C{*filter*}from Wisconsin and Quixote from ICOT. (There could be more !)

There will also be a special issue of VLDB Journal on Prototypes of Deductive
Database Systems where you can find the latest development in this area.
It should be available by August this year.

Quote:

>       1) Most of the commercial implementations of Prolog offer interfaces
>   to certain relational databases (Oracle, Ingres...) through SQL.
>   Does anybody have any experience with these?  How easily or clumsily
>   do these work?  What sort of performance limitations are associated
>   with these?

Currently, the LDL++ system have direct access to several commercial relational
databases.

Quote:

>   I've become increasingly persuaded that combining Prolog's declarative,
>   logic programming approach with the ability to query databases
>   would be a powerful tool in my work.  This amalgamation is of course
>   a major research area - that of developing deductive databases -
>   but as I am a geographer, not a computer scientist, I would like
>   to know about existing successful implementations of this strategy
>   rather than research issues.  A particular example where I see using
>   this approach might be generating a landscape classification for
>   regions in a geographic information system using rules that are
>   far more complicated than can easily, if at all, be expressed
>   using the simple relational database inherent in the GIS.  
>   The questions then I have are:

FYI, Professor Carlo Zaniolo of UCLA, who directed the LDL efforts for
several years, is currently using the LDL++ system for reasoning about
geographical information.

Quote:

>       4) Finally, what have I left out, in terms of other solutions?
>   To take one thought, assuming the Prolog implementation offers decent
>   clause indexing, it should be possible to read a small or medium-sized
>   table directly in as Prolog clauses.  But when does this become
>   unwieldy, say in Quintus or BIM Prolog?

>   Thanks,

>   Allan Hollander
>   Dept. of Geography, UC Santa Barbara


KayLiang Ong
MCC


Tue, 15 Aug 1995 12:03:43 GMT  
 Prolog, deductive databases, and SQL
Allan,

Quote:
>     1) Most of the commercial implementations of Prolog offer interfaces
> to certain relational databases (Oracle, Ingres...) through SQL.
> Does anybody have any experience with these?  How easily or clumsily
> do these work?  What sort of performance limitations are associated
> with these?

Sorry, no real experience here. A student of mine once implemented a
Quintus Prolog to Oracle interface based on inter-process communication
to make it portable to any Prolog-SQL system under UNIX, and it
worked nicely. Code is available, as well as his thesis (in German,
unfortunately).

Quote:
>     2) Does there exist any public-domain code that can generate
> SQL queries from Prolog?

Well, it's not in the public domain, but available for free: I wrote
a Prolog to SQL compiler which I posted to the net around christmas.
It is written in clean Prolog, has been ported to many different
Prologs (the main difference being the gensym/X and cpu_time/Y
predicates), and it is efficient (translation of a query about
as fast a an access to a fast hard disk).

The code is available upon request. Furthermore, a tech report
on the compiler implementation is available (via e-mail in FrameMaker
MIF format).

Quote:
>     3) What is out there in terms of deductive databases that
> integrate these two areas more tightly than through the Prolog-SQL
> approach?

Try SEPIA Prolog of ECRC. They distribute it for a nominal fee to
academic institutions, it runs on SUNs, and is a very complete
package, including the MEGALOG persistent database system (multi-
user access, persistent storage of prolog terms and rules).

Furthermore, in collaboration with Birmingham university, ECRC has
a very nice demo of a geographic application: national parks in Bavaria
are populated by different animals; on a map of the parks you click
on areas of interest and the animals living there show up (pictures,
sound! etc).

Quote:
>     4) Finally, what have I left out, in terms of other solutions?
> To take one thought, assuming the Prolog implementation offers decent
> clause indexing, it should be possible to read a small or medium-sized
> table directly in as Prolog clauses.  But when does this become
> unwieldy, say in Quintus or BIM Prolog?

Don't worry too much about size: we have a phonetic database consisting
of hundreds of clauses

   segment_file(FileName,Speaker,City,Segmenter,SentNo,Version,Segments)

with Segments a list of approx. 50 elements which may be lists again.

Storing them in SEPIA (or even: LPA MacProlog on a Mac) is no big deal,
and access time is good. The major reason for which we want the data
to be stored in a DB is multi-user access - it's NOT size or efficiency.
(BTW: in most deductive DBMS you can't store structured terms, in
relational databases you can't either - so very often there is no
alternative to having all the data in Prolog).

I hope this helps

Christoph

------------------------------------------------------------
Christoph Draxler
CIS Centre for Information and Language Processing
Ludwig-Maximilians-University Munich   Tel: +49 +89 36 40 72
Leopoldstr. 139                        Fax: +49 +89 361 6199

------------------------------------------------------------



Tue, 15 Aug 1995 23:13:02 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Deductive Database on prolog

2. Accessing an SQL database with SICStus Prolog

3. CfP: DYNAMICS'97 - (Trans)Actions and Change in Logic Programming and Deductive Databases

4. Deductive databases and function symbols?

5. Any Deductive Databases out there?

6. Final CFPs DDLP99: Deductive Databases and Logic Programming

7. 2nd CFPs DDLP99: Deductive Databases and Logic Programming

8. Release of Relationlog Deductive Database System

9. CFP - DDLP98: Deductive Databases and Logic Programming Workshop

10. : constraints in deductive databases

11. CfP: DYNAMICS'97 - (Trans)Actions and Change in Logic Programming and Deductive Databases

12. CFP: "Deductive Databases and Logic Programming"

 

 
Powered by phpBB® Forum Software