PrologSQL: SWI-Prolog to SQL bridge.
Prolog to ORACLE.
Prolog to ODBC.
This project was originally hosted at http://www.geocities.com/SiliconValley/Bit/1116/PrologSQL.html.
This is a very old project. It was originally developed in February of 2000.
PrologSQL main features
PrologSQL is a SWI-Prolog to SQL bridge, i.e. program that converts Prolog
predicate calls to SQL queries and send them to ORACLE or ODBC.
The Prolog - Oracle interface provides the programmer with two levels of
interaction. The first, relation level interface,
offers a tuple-at-a-time retrieval of information from the database
tables. The second, view level interface, can translate an
entire Prolog clause into a single SQL query to the database, including
joins and aggregate operations.
This interface allows database tables to be accessed from Prolog
environment as though they existed as facts. All database accesses are
done on the fly allowing Prolog to sit alongside other concurrent tasks.
PrologSQL interface gives an database programmer all the features of Prolog as
a query language including intensional database specification,
recursion, the ability to deal with incomplete knowledge, inference
control through the cut operation, and the representation of
negative knowledge through negation.
- Interface features
- Concurrent access for multiple Prolog systems to Oracle 8.*
- Full data access and cursor transparency including support for
- Full data recursion
- Runtime type checking
- Automatic handling of NULL values for insertion,
deletion and querying
- Partial recovery for cursor losses due to cuts
- Full access to Oracle's SQLplus including
- Transaction support
- Cursor reuse for cached SQL statements
with bind variables (by avoiding re-parsing and re-declaring).
- Caching compiler generated SQL statements with bind variables
and efficient cursor management for cached statements
- A powerful Prolog/SQL compiler
- Full source code availability for ports to other versions of
Oracle or other platforms
- Independence from database schema by employing relation level
- Performance as SQL by employing view level
- No mode specification is required for optimized view compilation
- PrologSQL is distributed under GNU public license.
- PrologSQL is derieved from
XSB - Oracle Interface By Hassan Davulcu and Ernie Johnson.
- XSB - Oracle Interface uses a powerful Prolog/SQL compiler from
Christoph Draxler, Munich.
- Oracle and Odbc Template Library
is used as a low level database access engine.
Known bugs and limitations
- It is possible to connect to only one database.
- Weak error reporting :-(
- Unzip archive to a temporary directory.
- Copy files OracleProlog.dll, oracle.pl, ODBCProlog.dll, odbc.pl,
PrologSQL.pl to your working directory or to prolog search path.
E-mail for contacts
If you have any questions, bug reports or comments regarding PrologSQL,
please contact me.