High scalability: SQL and computational complexity
rethinkdb.com
rethinkdb.com
For example, a key-value store can run simple lookups fast - O(1) - but if you want to run a complex analytical query you'll be running lots of those queries - maybe O(N) because you have to fetch all the data. You'd be better off simply allowing one O(N) (or better) query, rather than dealing with the overhead of N O(1) queries.
Disallowing some fraction of queries doesn't magically make your database scalable, it's just an accountancy trick.
Exposing a full query language to the database system means that you have the opportunity to optimize the query fully. Limiting the query language only limits your ability to optimize, so you won't even be able to explain to the user that there's an alternative way to get their answer without bringing down the database.
Are there limitations of databases such that it is possible to come up with better query execution strategies than the database can figure out automatically - of course there are! But in that case, fix the query optimizer or fix the database. Don't try to solve the problem by redefining it.
Regarding your argument of a fuller optimization, presumably a well designed query language would be flexible enough to allow the user to express every possible realtime query (assuming this is theoretically possible), so the user doesn't need to combine smaller queries via host-language trickery. People have been trying to fix the optimizer for decades, but most production optimizers still have plenty of edge cases. Perhaps redefining the problem is exactly what the doctor ordered?
That said, it's great that you're re-examining the problem; that's how progress is made.
This seems backwards. The more general a language is, the harder it is to analyze and transform, and that is what optimizers do.
A lot of the NoSQL arguments are really "No-MySQL" or "NoMoney" arguments. If you've never used Oracle (or DB2, or even SQL Server), you really don't have a full understanding of the capabilities and limitations of SQL databases. AFAICT, there's almost nothing in MySQL that wasn't old and boring in Oracle over a decade ago.
Think about an Oracle execution plain as your declarative SQL query rewritten as a procedural program as you would write it in C/Java/Python/Ruby with hashtables, nested loops, if statements, etc.
It's an interesting article. But isn't he just saying, P=NP is a problem, so let's ban P=NP? Is this programmer newspeak?
"If this holds true, even if we can trivially parallelize each query, an exponential function (the amount of information) divided by a polynomial (number of machines) still dominates the logarithmic function we defined earlier as acceptable. This means that given modern trends, if a given query isn’t scalable vertically, it also isn’t scalable horizontally, which makes SQL fundamentally unscalable, period."
Cut out the fluff and all that's saying is "Given modern trends, SQL is fundamentally unscalable, period." And why? Because anyone can write a bad query. And what's the answer? Complexity guards? Well, it certainly sounds good, more guards in SQL, or let's not call it SQL if there are organizational issues (i.e. non-modular design) and syntactical paradigms to improve. And lets insert some other [undescribed] computational theory to improve it, but the paradigms don't change the algorithmic reality, they can only hope to strategize better.
Having said all that, I don't want to be misunderstood, it sounds like there may be some very interesting ideas behind all of this. It's hard to know in a case like this whether to comment on something, considering that much of the comment is negative. What motivates me is that in bullet points the article seems to imply something quite different than it sounds like when taken at face value. And I honestly appreciate push back if I'm just wrong about that. It's all about filters required to find the good stuff in all the the hyperbole that surrounds us.
Seems rather unrealistic and academic to me.
The point about a query language that provides a complexity guarantee is more interesting.