4 ms·
I'm worked on the side in a relational language (https://tablam.org https://tablam.org) and have used FoxPro, that in a lot of ways is superior to any RDBMS of
by mamcx 6y ago
I'm worked on the side in a relational language (https://tablam.org https://tablam.org) and have used FoxPro, that in a lot of ways is superior to any RDBMS of today.
The ideas here are very good! But exist many other things that could have a greater impact:
1. We need an "wasm" for sql.
SQL is not a good language to transpile to.
ALL ORM ARE TRANSPILERS!
The relational model allow to do so much with so little (you don't even need to create a foreign procedural language if you add basic programming constructs). In FoxPro, you DB lang, your query lang and your programming lang was one and the same.
Much better.
Now today this could not fly -for some-, but a "wasm/llvm little" tailored to rdbms could be a very good idea.
Is exactly what things like GraphQL are, sadly, GraphQL is not made for DBs and is a hostile target for them.
1a: "But who will replace SQL, that is nuts!"
This is the major excuse. But things like graphql show is possible.
The "trick" is that this new query lang is SERVER SIDE. Developers will use it if is nice, and the major work is on libraries.
Solve this is not as hard as people think. In fact, is done MANY TIMES BEFORE!. But most not see it because not understand that what we are doing with SQL is making ad-hoc compilers.
And is done to JS with wasm. If is possible to do it for JS, sql is piece of cake.
2- We need Algebraic types: eliminate NULLS from their last bastion
Have algebraic types as first class will be a very good improvement here. No more null shenanigans, and will match what we know as today as best practiques.
Plus, will allow to fulfill better the ideal of a DB of "data modeling" of business requirements.
3- The auth support of RDBMS is for a bygone era.
The article show it, but the truth is that "nobody" use the auth support of rdbms outside some niches. A modern rdbms only need the equivalent of JWT and the ability to do custom auth checks. This will allow to actually plug the auth that is tailored to the app via:
4- We need "sql install simple-auth" aka: Package manager
As I said, I use fox pro. it was a full feature programming environment. This mean I have frameworks/libraries that I could distribute or integrate. A DB can benefit to install packages and declare its dependencies like with rust.
This could be great for example, to install a well vetted auth support for the db, or logging, or tracing, or extra functionality like fts.
And how about use wasm as the binary interface?
- eloff 6y agoString parsing is not an appreciable part of the query execution cost. I'm not sure what the goal here would be otherwise?
- mamcx 6y agoSQL, alike JS, is not a good target for the myriad of languages(and orms) than target it, and it have intrinsic limitations that are historical artifacts. Is not the cost of string concatenation, is to provide the benefits of a good byte code that could allow, for example, type check input, schemas and other stuff on client side before touch the db. Is similar to how GraphQL unlock great tooling because is a specification that was designed for be a target of said tooling.
- eloff 6y agoYeah, that would be nice to have.
- bobbydreamer 6y agoMy dad used to say that, FoxPro is the best in MSDos and visual Foxpro killed it and it was so fast in handling large amount of data.