A query in Prolog can be thought of as a form of pattern matching. Is a WOQL query (usually prefixed with a WOQL.select) just a thin wrapper around Prolog’s unification, or is there more going on here?
On a high level, I can see that a WOQL query takes three inputs:
- A database of triples (TerminusDB itself)
- A list of variables to be returned in the result (the “select”)
- A set of constraints on variables of interest (everything else in the query)
…and produces a table as the output.
My guess is that a WOQL query is a Prolog-backed pattern matching followed by a relational-ish projection?
If not, I’d love to know the exact mathematical/conceptual foundation of WOQL (link papers or blog posts if you have em).