|
|
|
|
|
by kragen
368 days ago
|
|
Basically Datalog is much less verbose than SQL, imposes much lighter tariffs on factoring out views, and supports transitive closure enormously better. I started http://canonical.org/~kragen/binary-relations off with a simple nonrecursive query for which the SQL translation (given below) is already criminal and whose properly factored SQL solution merits the death penalty. Recent additions to ANSI SQL have added the capacity for recursion, so it's no longer completely impossible. But they have three big disadvantages: 1. They accidentally made SQL Turing-complete. Datalog queries, by contrast, are guaranteed to terminate. 2. They're still extremely clumsy to use. 3. Because of #1, they're often not implemented fully, so they are hard to rely on. |
|