3 ms·
Common programming idioms, for example iteration, are hard to express in a SQL query, and I think if you try to force iterative ideas on this declarative langua
by bellybutton 17y ago
Common programming idioms, for example iteration, are hard to express in a SQL query, and I think if you try to force iterative ideas on this declarative language the result is frustration or fear.
The need to be able to express yourself iteratively was a motivator for Microsoft's DryadLINQ - a programming language for distributed computation that has SQL-like constructs integrated into C#, giving you a high-level language with some of the declarative benefits as well as some of the imperative benefits (including more natural ways to express iteration).
- DrJokepu 17y agoI think if you try to force iterative ideas on this declarative language the result is frustration or fear But fortunately we have (tail) recursion to fight back in most declarative languages. Which is something that's completely missing from SQL. There should be a way to express recursion in SQL queries in my opinion.
- yangyang 17y agoWell Oracle has "connect by": http://www.oracle.com/technology/products/oracle9i/daily/oct04.html http://www.oracle.com/technology/products/oracle9i/daily/oct...
- jamii 17y agoDatalog is more or less equivalent to SQL with recursion. I don't know of any serious, database-backed implementations but there are a lot of in-memory implementations and some interesting extensions for distributed databases. http://en.wikipedia.org/wiki/Datalog http://en.wikipedia.org/wiki/Datalog