5 ms·
Indeed. SQL concepts are insanely powerful, but the language itself feels a little bit old.
by raphaelj 7y ago
Indeed. SQL concepts are insanely powerful, but the language itself feels a little bit old.
- comboy 7y agoI think it aged insanely well. DBs are often a bottleneck and need to be heavily optimized so you need to spend some time explaining to your database what it is that you really need, but in general, SQL is all about telling what do you want and not worrying about how it's going to get done. That's how programming languages should look like. We have so many ORMs and most often they look more ugly than pure SQL to me, especially when it comes to more complex queries. You could write a translator (something like coffeescript -> JS but X -> SQL), but can you really come up with a syntax that's enough of an improvement that it would be worth using it?
- AmericanChopper 7y agoI would agree. SQL is absolutely beautiful in its simplicity imo. I learned SQL along side my first imperative programming language, so I guess I’m significantly biased, but I think it’s the easiest language I’ve ever learned. The best part is, if you spend enough time writing SQL, you end up learning quite a bit about how databases, data structures, and the time complexity of query execution all works. Which is all incredibly valuable for just about any programmer. I also love ORMs. But perhaps my knowledge of SQL has enhanced my ability to use them well. Without them you end up with numerous other problems which I’d consider worse than the occasional compromises ORMs require. Ideally you want all your business logic in one place, or at least in discrete units, so the fragmentation of stored procedures is a major downside. Embedding SQL directly into other business logic is like and uglier version of an FFI, and serializing SQL statements is even more of a security concern than marshalling FFIs (something that can already be a bit of a footgun). I’d recommend any engineer to learn SQL, but for people who use ORMs a lot already, I’d suggest to start with understanding explain plans first.
- Kihashi 7y agoIME knowing SQL is a prerequisite to using an ORM efficiently.
- Someone 7y agoIMO, a disadvantage of SQL is that it was designed for batch processing, not for modern editors. If you type select foo, bar from baz auto-complete cannot help you type the field names because it doesn’t know what table(s) you’ll be querying. On the other hand, LinQ’s from baz select foo, bar allows your editor to auto-complete the field names for you.
- deleted 7y ago[deleted]
- bauerd 7y agoI much prefer it to arcane JS(ON) query formats someone dreamed up in a hurry, only to avoid SQL. Only exception I can think of was RethinkDB
- nobleach 7y agoReQL was really nice. I miss that DB (Yes, i know it still exists - but is it still being worked on?)
- icebraining 7y ago> is it still being worked on? Maybe? Seems like ReQL itself will live on, even if not the whole RethinkDB: https://github.com/rethinkdb/rethinkdb/issues/6747 https://github.com/rethinkdb/rethinkdb/issues/6747
- ken 7y agoOr is it the other way around? C++/C# concepts are insanely powerful, but they feel to me like we're trying really hard to drag the Simula data model into the 21st century. Today if you asked me to design an object model for software to model objects, I wouldn't end up with anything remotely like C++/C# has.