SQL. Ultimately a software company is a business, run by business people who have to solve business problems. Often to do that they come up with questions which need to be answered by ad-hoc (written on the fly for one purpose) SQL queries. Having that ability, to answer arbitrary questions FAST will elevate your status in the minds of managers and business people.
0. Look at a few simple sql queries (at most one join) and the corresponding schema. Internalise what the queries do and a rough idea as to the syntax
1. Have a database to query (or think of some project that is basically a frontend on a database and which you can give a reasonable amount of data) 2. Come up with questions for the database you want to answer 3. Look at the SQLite documentation. They have fantastic diagrams for the syntax of a sql query. 4. Write down the sql for your query (or work out what you can’t express and see if you can search on the internet to find out how to express it) 5. Look into relational algebra and try to work out how it corresponds to sql databases. 6. Repeat steps 2-4 7. Understand what different types of joins there are 8. Repeat steps 2-4 9. Read about more exotic things like nested queries, window functions, recursive queries, and so on (just look at the features of your database of choice and see what you can learn about). These might come in handy for future questions 10. Repeat steps 2-4 (repeatedly) If you don’t know which database to use then start with SQLite. It’s basically fine for anything simple and manything complicated.
Personally, I like the gentle introduction given on W3Schools. It shows you what you have and what you aim to get out of it in terms of data, and removes the need to bother with a local setup, letting you focus on the actual queries instead.
(self plug) you might want to give pgexercises.com a go. It takes you from beginner up to somewhat advanced with exercises that you can run in the browser.
I second that. Most developers don't bother with SQL and suffer for it (having to do lots of work with the data after selecting it or having poor performance). Very few developers use analytics functions with which you can do wonders.
The most annoying thing I hear often is that if you use Hibernate you don't need to know SQL. Last time I checked, Hibernate's manual had something like a thousand pages. It's better to just learn SQL.
Second this. I'm an electrical engineer who writes SQL queries daily. Knowing where your data is, how it is organized, and enough tools to do something with it: SQL, Excel, Python, R...etc is vital for making business decisions.
W3Schools has a good SQL tutorial I recommend to new engineers. After that just try to use it and use stack overflow when stumped. Easy things are easy, but some harder things can be difficult for some to grok.
Recently, I started learning SQLite. I have some knowledge of python so I want to organize my information using SQL and python (Being electrical engineer, I am not coding for earning).
Comments (563) 147 threads
Show all comments
Showing thread 13 of 147
1. Have a database to query (or think of some project that is basically a frontend on a database and which you can give a reasonable amount of data)
2. Come up with questions for the database you want to answer
3. Look at the SQLite documentation. They have fantastic diagrams for the syntax of a sql query.
4. Write down the sql for your query (or work out what you can’t express and see if you can search on the internet to find out how to express it)
5. Look into relational algebra and try to work out how it corresponds to sql databases.
6. Repeat steps 2-4
7. Understand what different types of joins there are
8. Repeat steps 2-4
9. Read about more exotic things like nested queries, window functions, recursive queries, and so on (just look at the features of your database of choice and see what you can learn about). These might come in handy for future questions
10. Repeat steps 2-4 (repeatedly)
If you don’t know which database to use then start with SQLite. It’s basically fine for anything simple and manything complicated.
https://www.w3schools.com/sql/
The most annoying thing I hear often is that if you use Hibernate you don't need to know SQL. Last time I checked, Hibernate's manual had something like a thousand pages. It's better to just learn SQL.
W3Schools has a good SQL tutorial I recommend to new engineers. After that just try to use it and use stack overflow when stumped. Easy things are easy, but some harder things can be difficult for some to grok.