Re: Prolog and Oracle

From: Konrad Schwarz <schwarz_at_mips.complang.tuwien.ac.at>
Date: 23 Feb 1994 16:30:12 GMT
Message-ID: <2kg0ak$cdp_at_email.tuwien.ac.at>


In article <2jfufd$dtm_at_fbi-news.informatik.uni-dortmund.de>, bell_at_kiosk.informatik.uni-dortmund.de (Siegfried Bell) writes: [...]
|> we would like to connect Quintus-Prolog with Oracle using TCP/IP.
|> But we do not know WHAT Prolog have to send the Oracle-Server, e.g.
|> what kind of data have TERM to be in the Prolog-predicate
|> tcp_send(Tag,Term) to get an answer from the Oracle-Server.

I am writing a prolog/Oracle interface for SICStus. As such, I am not familiar with Quintus's tcp_send predicate. I assume that it sends Term out on the stream connection Tag (or something similiar). This will not be enough, since, as far as I know (I have not specifically researched this question), the SQL*Net protocol is not documented, so you probably won't be able to talk to the RDBMS kernel directly. You could talk to a SQL frontend, like SQL*plus, via some kind of pipe or pty setup.

The avenue I am exploring is to use SICStus's C/Prolog interface, that allows C functions to be called as Prolog predicates (and the other way around). Quintus will definitely offer something similiar. I attach onto Oracle using the OCI function library. This library's drawback (at least in v6) is that it forces you into a synchronous mode of operation, which should be no problem for simple prolog applications, however.

Konrad Received on Wed Feb 23 1994 - 17:30:12 CET

Original text of this message