SemMedDB and Prolog

There are various ways accessing such repositories.

  • Using the new RocksDB clauses would quite likely do the job. Access performance will be limited to about 30k-300k lookups/second (depending on data structure, indexes and further enhancements).
  • Use an external database, either using ODBC or the embedded sqlite or my recent prototyped access to embedded MonetDB. Lookup for single rows is slower than above (probably), but if you can make the database do interesting joins that do not perform well in Prolog the end may be quite ok. Although setting it up can be hard, the bundled CQL package can translate Prolog conjunctions to SQL joins (and a lot more).
  • Translate the data to RDF and compile that to an HDT. Then use SWI-Prolog’s HDT add-on to gain access. That scales fine. Triple access times should be about 500K/second.
  • Similar, using TerminusDB. You can use their query language and I think you can also access the triples from Prolog.
1 Like