8 ms·
SQL. If I had to pick a language that I'll use my entire career that's the one. It has been overused and underused, but always relevant.
by geebee 10y ago
SQL. If I had to pick a language that I'll use my entire career that's the one. It has been overused and underused, but always relevant.
- cwbrandsma 10y agoI'll agree with you there. SQL is the one language that I hate, yet use constantly, and will certainly out-live me.
- weavie 10y agoI used to think I hated SQL until I decided I had had enough of it and I tried to do a project using a no-sql database. Suddenly everything became a lot harder and I was having to write massive amounts of code to do the things that could be done with a few lines of SQL. Even the simplest of tasks just sucked the life out of me. I soon ported the project over to use Postgres and decided that actually SQL is awesome.
- m_fayer 10y agoI know exactly what you mean. I've realised that when you're solving a hard problem (complex data logic, extreme performance requirements) with SQL, you end up systematically experimenting and thinking very deeply within a rigidly defined system. With no-sql databases, you're monkeying with obscure APIs that cover up obscure, idiosyncratic, and hard-to-reason about database engines, and patching strange behavior with rickety app-layer code. Both kinds of work are hard, but with SQL you can usually expect the problem to yield to intense engagement and produce a solution that's complete, robust, and satisfying.
- ytjohn 10y agoThen you learn about hstore and json store in postgresql and you realize it's the best of both worlds.
- shaftway 10y agoI love that I'm at a company that I haven't had to use SQL. I don't know if I could even find a relational database here. But in a classic meme sense: "It isn't you I hate SQL, it's what I have to think about when I use you." I don't want to spend my time thinking about database indexes, query plans, or other complicated bits. I just want to get my data out. Sometimes I struggle, and I'd give anything for a plain inner join, but on the whole I like this tradeoff.
- danso 10y agoI still teach SQL, via SQLite, as a first language to students, even though in practice I do 90% of my data analysis through the command line or Pandas. But SQL is very direct and clear as a language, and the overhead of SQLite is...well, light. Making an index is just one more line of code that for many datasets, you run once and never touch again. What do you find simpler in terms of data querying and management?
- shaftway 10y agoI kind of inferred this, rather than outright stating it, but I like SQL. The concepts are elegant, the language is a little kludgy but not obscene. I can never really remember the semantics of left, right, outer and inner joins, but I usually don't want missing data so inner all the way. It's not SQL I dislike, it's that it means I'm using a database, and I've lost more of my life than I care to admit to in planning, designing, and maintaining databases so that they perform under production pressures.
- geebee 10y agoI love sql myself. I'm not sure why I love it so much and other people hate it. Sometimes I think that coming up with reasons is just after the fact justification (do I really like it because it has a solid mathematical foundation in the relational calculus, or does that just sound like a good reason to say I like it)? Pandas is an excellent contribution to data analysis, but I gotta tell you, I was absolutely delighted to learn about pandasql and realize I could write selects, group by, order by, and so forth, converting data frame to data frame through sql. What can I say? I truly encourage people to give SQL a real chance. I'm happy to use ORMs that save me some typing on simple queries, and certainly I use a combination of pandas and sql, there are some things much better accomplished through a programming language. But I'm willing to drop to SQL pretty quickly if I sense that the programming language or library is really just forcing me to re-learn a new implementation of sql.
- pacofvf 10y agomy workflow with complex queries despite the fact the outcome is always the same: Write a SQL query to see if it works as supposed, use a query builder in another language, analyze the code and the query because it's not as fast as I would liked to, realize the entire code in another language would be faster if it were a stored procedure in SQL, write stored procedure, repeat.
- thecity2 10y agoYep, no getting away from SQL any time soon.