> Datalog has great compositionality, which is one of SQL's big weaknesses
There's a good write-up on this aspect (amongst others) here: https://www.scattered-thoughts.net/writing/against-sql/
> recursive queries are completely natural in Datalog, whereas in SQL they are bolted on with recursive common table expressions
And similarly: https://github.com/frankmcsherry/blog/blob/master/posts/2022...
Foremost, Datalog has great compositionality, which is one of SQL:s big weaknesses (it was designed with completely different goals). Also, things like recursive queries are completely natural in Datalog, whereas in SQL they are bolted on with recursive common table expressions.