# Tutorial on accessing external databases

**URL:** <https://swi-prolog.discourse.group/t/tutorial-on-accessing-external-databases/2288>\
**Category:** Request For Comments\
**Created:** [May 6, 2020, 2:48pm UTC](https://swi-prolog.discourse.group/t/tutorial-on-accessing-external-databases/2288 "2020-05-06T14:48:56Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Post date:** [May 6, 2020, 3:37pm UTC](https://swi-prolog.discourse.group/t/tutorial-on-accessing-external-databases/2288/5 "2020-05-06T15:37:41Z")

</div>

While I know the focus is on using SWI-Prolog with ODBC databases are you aware of [library(persistency): Provide persistent dynamic predicates](https://www.swi-prolog.org/pldoc/man?section=persistency) ?

If you are starting with a clean project and do not need to use an existing database this might be a better option. Using it with [Quick load files](https://www.swi-prolog.org/pldoc/man?section=qlf) is a synergistic option. AFAIK all of the data has to be loaded into memory but I have used these with Gigabtyes of data. ([ref](https://swi-prolog.discourse.group/t/quick-load-files/1239/4))

**EDIT**

So as not to add lots of independent single post I will just let them pile up here as edits. And to make it easier for others to ignore, make use of the Hide Details.

> **Click on triangle to expand**
>
> SWI-Prolog is also provided as a Docker container ([ref](https://hub.docker.com/_/swipl)) but many prefer to either start with [SWISH](https://swish.swi-prolog.org/), or just [install](https://www.swi-prolog.org/download/stable) on their machine.
> 
> [library(aggregate)](https://www.swi-prolog.org/pldoc/man?section=aggregate): Aggregation operators on backtrackable predicates
> 
> [library(record)](https://www.swi-prolog.org/pldoc/man?section=record): Access named fields in a term
> 
> Since I have a [need](https://swi-prolog.discourse.group/t/crossed-50k-pageviews-per-month-on-discourse/2258) to learn more about how to setup Discourse with Docker and this has some connection points with what you are doing, I will be using your document and [these](https://meta.discourse.org/tags/c/howto/devs/56/dev-install) in combination.

---

_[View the full topic](https://swi-prolog.discourse.group/t/tutorial-on-accessing-external-databases/2288)._
