3 ms·
I like the first-class-relations idea. As for pervasive NULLs, isn't that more the fault of schema design? There are a lot of things wrong with SQL. Little th
by MaxBarraclough 8y ago
I like the first-class-relations idea.
As for pervasive NULLs, isn't that more the fault of schema design?
There are a lot of things wrong with SQL. Little things like the fact that INSERT and UPDATE have different syntax for no good reason.
A few of its syntax quirks annoy me as they're nonstandard in today's languages, but it's only a shallow complaint: using '<>' for its inequality operator, and using single-quotes for strings.
I'm also disappointed in the implementations in various ways: the way Microsoft SQL Server sends query text over the wire unencrypted, in its default configuration. The way Firebird SQL has such a basic wire protocol that you can see significant performance enhancements by invoking TRIM on text-type fields. The way the optimisers are so damn primitive, especially compared to the baffling wizardry that goes on in today's (programming language) compilers.
Somewhat off topic further ranting:
But the core relational model makes good sense. I see little general value in the freeform graph-databases calling themselves 'NoSQL'. (Do we call functional programming languages "No-assignment"?)
Perhaps some of them can scale well, but can't SQL do that? Google Cloud Datastore, for instance - it can scale marvellously, but only because it imposes considerable constraints on its queries. Can't we do the same thing with an SQL subset?
- naasking 8y ago> As for pervasive NULLs, isn't that more the fault of schema design? I think NULL defaults are widely regarded as a bad thing by now. You should have to declare what's nullable, not declare what's not null. > There are a lot of things wrong with SQL. Little things like the fact that INSERT and UPDATE have different syntax for no good reason. Moreover, SELECT should be at the end not the beginning. Query comprehensions and LINQ did this right. And yes, the implementation inconsistencies are seriously irritating as well. > Google Cloud Datastore, for instance - it can scale marvellously, but only because it imposes considerable constraints on its queries. Can't we do the same thing with an SQL subset? If you extend Map-Reduce with a Merge phase, then you can implement the relational algebra with joins [1]. That scales pretty well. http://cs.brown.edu/courses/cs295-11/mapreducemerge.pdf http://cs.brown.edu/courses/cs295-11/mapreducemerge.pdf
- tomnipotent 8y ago> Moreover, SELECT should be at the end not the beginning. Query comprehensions and LINQ did this right. I'd one-up this and argue that all SQL statements should be in order of execution (within reason). Moving SELECT to the end is definitely a good start.
- nl 8y agoMixing execution concerns and the language seems like a bad idea. It's pretty much impossible to decide what an optimised query should look like on a different databases with different data. Slow network? Fast disks? GPU optimised joins? No way to know what execution order should be, and that's a strength of the relational model.
- MaxBarraclough 8y agoInteresting paper, thanks.