SQL was never intended to be used by computer programs. It was a console language for printing reports. Embedding it into programs was one of the gravest errors of our industry.
Discussion
how do you think DBs should behave? or is it just the language
I can't speak very authoritatively about the DBs, but the language for sure has to be dumb: ORMs are very popular, and they work by exposing an API that takes structured inputs, then it generates a human-readable string to send to the SQL server, which then has to parse that string again into structured data before acting on it.
i agree. i prefer mongo db approach.
I think that is worse (for different reasons), but maybe nostr:nprofile1qqsza7flq8xjfylqgg66dwrmzrfuff6w9flt0s72795zdrm27ue3fdgct4s0j will agree with you.
what is the reason? :homerdisappear:
I’ve never used Mongo DB. I have no problem with the relational model per se. My issue with SQL is that it is text based and compiled in real time. That makes it a huge security concern. It’s also just really inconvenient for programmers to have to construct sequel statements using a text library. In general databases should be accessed through a software API — a library of function calls that are driven by data structures that cannot be compiled in real time.
What about ORMs?
one of my ideas at the beginning was a nostr specific database. after a while i realised that after one or two versions my db would turn into a relay.
I had to do a double take, but I guess that means I’ve been indoctrinated. So the alternative is true data-service isolation, app -> API -> stored procedures/views ?
Although as soon as a human needs or wants to interact with the data instead of the program SQL databases are better than all the alternatives.
Also people are free to not use SQL in their applications so why do they keep doing it?