proSQLite


This library allows SWI to communicate with SQLite databases.
It should also work with small modifications on Yap.
db_facts is a sister package that allows SQL tables to be accessed via Prolog terms.

Installation

It is highly recommended that you install from within SWI using its package manager.
To install simply do:

?- pack_install(prosqlite).

If are compiling SWI from sources in a linux set up, also give
?- pack_rebuild(prosqlite).

And then load by :
?- [library(prosqlite)].

Materials

Pldoc produced documentation: prosqlite.html
Example uniprot database from the paper: uniprot.sqlite (184Mb)
Example queries on the above database (also in examples/uniprot.pl): uniprot.pl
Output from the uniprot example: uniprot.html
Pack sources: prosqlite
Sources at github: prosqlite
Github access: git clone https://github.com/nicos-angelopoulos/prosqlite.git

Publications

ProSQLite: Prolog file based databases via an SQLite interface
Canisius Sander, Nicos Angelopoulos and Lodewyk Wessels
In proceedings of Practical Aspects of Declarative Languages (PADL 2013).
To appear. (January, 2013. Rome, Italy).
[padl2013-prosqlite.pdf], [bib]

Exploring file based databases via an SQLite interface
Canisius Sander, Nicos Angelopoulos and Lodewyk Wessels
In ICLP Workshop on Logic-based methods in Programming Environments (WLPE'12)
p.2-9, September, 2012. Budapest, Hungary.
[wlpe2012_sqlite.pdf],[bib]

Thanks

To SQLite developers.
To MinGW and MinGW64 developers, the software we used to compile MS wins binaries on..
Jan Wielemaker, the SWI-Prolog author, for the ODBC package on which we based proSQLite, and C-interface hints.
Samer Abdallah, for two patches (UTF and blobs) in 1.0.
Christian Gimenez (suggesting sqlite3_close_()), Wolfram Diestel (bug on opening 2 aliased dbs) and Steve Moyle (for safe_column_names/2, Nov 2016).

Contributors

Canisius Sander (the core of the C-interface for 0.0.1)
Nicos Angelopoulos (everything else)
---
London
November, 2016 - March 2018