Which prompts me to direct your attention to What you always wanted to learn about Datalog (and never dared to ask)
Non gardenwalled version.
That was a pretty good read! I don’t come away knowing how to write/execute a Datalog program, but I do have an appreciation for how it all works.
I struggled to find the right tags for this. There’s no “prolog’ or “logic”. “math” is pretty close, the link does get into some interesting math! But I figure the kinds of people who follow the “math” tag might disagree with me :) “database” is also nearly correct, datalog is intimately related to relational algebra, but again this isn’t the content someone following the “database” tag would expect to see.
Datalog is a strange beast (it’s a mixture of logic, database and classical AI search strategies) so I don’t think we have the right tag.
But I agree with you we need a prolog/logic tag!