4 ms·
A well thought-out post and a good read, but both of the author's points about the limitations of relational databases are a little misleading. The first, "Eve
by aaw 17y ago
A well thought-out post and a good read, but both of the author's points about the limitations of relational databases are a little misleading.
The first, "Every single element in a relation (aka table) has to be exactly the same type" is true in many relational databases, but isn't necessary: SQLite, for example, is implemented with a nice form of dynamic typing where individual columns can take on multiple data types.
Second, "SQL isn't even Turing-complete" is sort of a folk theorem in computer science that isn't necessarily true anymore, especially with all of the proprietary SQL dialects in existence: the original standard, SQL92, is basically equivalent to relational algebra, which has the expressive power of first-order logic - it's so weak it can't even express concepts like graph reachability. But constructs like recursive queries have been added to the SQL standard since SQL92 which may make even standard SQL Turing Complete.
- gaius 17y agoPL/SQL and T-SQL are certainly Turing complete.
- samuel 17y agoAFAIK PL/SQL is not "Oracle's SQL". It's executed by a different engine and you get context switches when you execute SQL Code (don't know about T-SQL). But Oracle's SQL is by itself Turing complete since the introduction of the "Model" clause (see here: http://www.adellera.it/investigations/nocoug_challenge/index.html http://www.adellera.it/investigations/nocoug_challenge/index... how you can compute the FFT using it). Moreover, I read somewhere that the engines that implement the "recursive with" are also Turing Complete, but can't recall where.
- Confusion 17y agoSecond, "SQL isn't even Turing-complete" is sort of a folk theorem And it doesn't mean anything, unless you specify its exact limitations. If they are merely theoretical limitations that nobody uses in practice: who cares?