4 ms·
Would be nice, but bazillions of lines of SQL at the core of almost every business system make this as likely as “We can do better than five fingers.” The arti
by gregjor 6y ago
Would be nice, but bazillions of lines of SQL at the core of almost every business system make this as likely as “We can do better than five fingers.”
The article does nicely illustrate many of the well-known shortcomings of SQL. Chris Date and Hugh Darwen unsuccessfully tried to fix SQL with Tutorial D. Never heard of it? Exactly.
- deleted 6y ago[deleted]
- dragonwriter 6y ago> Chris Date and Hugh Darwen unsuccessfully tried to fix SQL with Tutorial D. Well, just the D class of languages; Tutorial D is (as the name suggests) a pedagogy-focusses implementation of the D requirements, the intent was that there would be one or more Industrial Ds. (Dataphor is a D—the first implemented, IIRC—and is successful enough that it's a still-living commercial product.)
- nerdponx 6y agoI assume this is different from the D programming language?
- dragonwriter 6y agoDate and Darwen’s D class of languages unifying the OO and relational models are different from Walter Bright’s “what C++ should have been” D language, yes.
- waheoo 6y agoYou can pry SQL out of my cold dead hands. Its just not that bad.
- Ziggy_Zaggy 6y agoIt almost seems as* SQL is a bit of a "must" by any data-heavy type of application/system so just spend 30 minutes and learn it already?
- gregjor 6y agoProbably more than 30 minutes, SQL may look easy but using it correctly assumes a fairly good understanding of the relational model. I agree that programmers too often seem to wave database design and integrity aside and create RDBMS/SQL worst-cases with ORMs and terrible queries, and then blame the tools.
- no-s 6y ago>>You can pry SQL out of my cold dead hands. Its just not that bad. I often joke that SQL is the COBOL of the 21st century. HHOS. There's worse things...e.g. COBOL. Actually it's very difficult to deny the empirically discernible utility of relational databases and SQL. SQLite, for example.
- waheoo 6y agoI'm alright with that. I think the problem is that developers love to abstract everything. And with the database often becoming a god object it's often targeted for abstraction. The problem is, querying data is a complex problem, complicated enough to require a query language. So the developer goes off to abstract the database for their needs, a helper table object here, a helper row object there and eventually you start to see an Orm appear. Developers need to be told to stop this behavior. The abstraction is the thing you are representing in the database, not the database. Your models should use plain SQL queries to execute behavior. If you must, setup some helpers to do very basic crud operations, but as soon as you need to really alter a where or a select, drop to SQL, use the language as intended and watch your code suddenly become modular, readable and maintainable. Yes, this means you will need to write SQL, yes this means you will write a lot of select and where statements, no this is not code duplication, stop freaking out about non problems. I swear to god DRY is the source of and solution to all developer problems.
- gregjor 6y agoCOBOL and SQL are for different purposes, apples and oranges. One can’t be worse than the other. Programmers who have never seen or written COBOL should stop trotting it out as an example of bad. You’d be surprised how many important systems are written in COBOL, and how well-suited it is for the problem domains it was designed for.
- paulhodge 6y agoIt's 2020 not 1995. There are already lots of good, production-ready SQL alternatives out there. There's full-fledged businesses that have zero lines of SQL.
- shrubble 6y agoI would like to hear of one such business. Can you give an example?
- Scarbutt 6y agoStripe's primary datastore is mongodb.
- quickthrower2 6y agoAnything that uses Activerecord
- pkalinowski 6y agoIsnt ActiveRecord using SQL behind the scenes?
- randomdata 6y agoTechnically ActiveRecord uses Arel, which in turn compiles, if you will, to SQL. Arel (a strict subset of) could theoretically be an alternative to SQL, if databases supported it as a native language. They don't, so the SQL step is a practical requirement. This is similar to the browser (especially in the pre-WASM days). No matter what language you actually wrote your software in, eventually you were going to end up converting it to Javascript out of necessity. Would you still say that your program written in C, compiled with emscripten, was written in Javascript?
- tialaramex 6y ago> Never heard of it? Exactly. "Accrington Stanley" https://www.youtube.com/watch?v=zPFrTBppRfw https://www.youtube.com/watch?v=zPFrTBppRfw
- quickthrower2 6y agoMaybe just have SQL Transpilers? I mean we accept ORMs, so we should accept that.