Assertz in SWISH

I don’t see it that way. When I think of a relational database I also think of it bringing along SQL because that is how many people are introduced to relational databases and access the data in them.

If one removes the SQL baggage and replaces that with Prolog queries life is better. As you know I am a fan of library(persistency) and data normalization and while I do know SQL, given the choice I would much rather use Prolog. Also when I use Prolog with normalized data like an SQL database I don’t pull the data from an SQL database but use library(persistency) instead. While I have not tried moving the persisted data into an SQL database, from my experience with using Prolog with ODBC it does not seem like a road block or even a lot of additional effort.

One point of note with library(persistency) that seems like a pit fall until you are aware of it is that Prolog terms like blobs don’t persist until they are converted to atoms.


EDIT

For the sake of completeness: Introductory Prolog tutorial for SQL programmers on Swish

Note: I don’t do Prolog queries exactly the same as in the tutorial (think refactoring) but many of the underlying concepts from Finding all Solutions to a Goal are essential.