Is it worthwhile to learn SQL for someone who will seldom need to access SQL databases? I so, what dialect?
Is it worthwhile to learn Japanese if you visit Japan only occasionally? For some it is, for others it is not.
Jokes aside, I think it is worth it for the average programmer.
If you have some experience with programming (which I assume you do, since you are posting in Julia discourse), it should not be too difficult to get the basic concepts. These concepts are also adopted outside of SQL (Python’s Pandas, Julia’s DataFrames.jl, and others), which is also an argument to learn them.
Dialect does not matter, the concepts are the same everywhere. Try whatever you can get your hands on. SQLite is perhaps the simplest to start with since you don’t need to run a server.
Ok, you convinced me. I’ll learn it.
Last question: Does the user of packages like MySQL.jl have to write SQL instructions or are they substituted by higher-level or just different commands?
MySQL.jl just provides a connection that can send SQL query strings off to a database. FunSQL.jl can provide some higher level syntax for producing those queries. If you just want to practice, you might also look at DuckDB.jl for creating local, in-memory databases
SQL is not rocket science. It’s probably worth learning the anatomy of a general SQL query (SELECT, FROM, JOIN, WHERE), but Google (and ChatGPT) will be able to help you construct any particular query for any particular dialect of SQL when you’re faced with a real problem.
I would split this into two parts:
- Do you need to know SQL?
- Do you need to know the concepts that underlie SQL?
I think it’s basically impossible to do data analysis without learning the concepts underlying SQL (i.e. 2 above) – at a minimum, you end up with an implicit intuition that all the problems you’re solving share a pattern that you don’t have a name for. If you learn something like R’s dplyr, you’re really learning the concepts that SQL formalized many decades earlier.
But if you know (2), learning SQL’s syntax for those core concepts is a matter of 1-2 days of work, so (1) is worth doing just because it’s so easy and so usable in practice.