by thenaturalist · 2y ago · 0 comments
I.e. I understand now that it's seemingly about more than simple querying, so me coming very much from an analytics/ data crunching background am wondering what a use case would look like where this is arguably superior to SQL.
Database theory papers and books have used Prolog/Datalog-like syntax throughout the years, such as those by Serge Abiteboul, just to give a single example of a researcher and prolific author over the decades.
D(a, b) Min= 1 :- G(a, b); # Connected by an edge => distance 1.
D(a, c) Min= D(a, b) + D(b, c); # Triangle inequality.
It will be much harder to read with SQL CTE.
It can also computed over weighted graphs, which is impossible or extremely hard with SQL.In practice you rarely need recursive querries, so gap between Logica and SQL isn't as large as it is here, but Logica is easier to read (in my opinion) for similar reasons.