Prolog to SQLite interface