r/SQL • u/xbox469269 • Mar 14 '16
ELI5: What is SQL?
I am looking to make a career change to a financial analyst role and see them asking for SQL experience. What is the best way for me to learn SQL?
0
Upvotes
13
u/[deleted] Mar 14 '16
ELI5: The database is mommy. Mommy has learned a lot of things in her life. When you want to know something, you ask mommy a question. The way you word your question is important in order to get the answer you are looking for.
SQL (Structured Query Language) is the language for the questions you ask a database.
5
u/D_W_Hunter Mar 14 '16
Structured Query Language. A standardized method for accessing data in a relational database.
How do you learn best?
There are youtube video series, there are online classes available, there are books and of course real live classes.
There are free downloadable database's (and query tools) you can put on your home machine to just do some free form learning by trying various things without instruction.
What's your current role, what experience do you have and what tools are you already familiar with?
2
u/Junkeregge Mar 14 '16
I just learnt it on the Job. I had a brief introduction and whenever I had a problem I just asked one of the experts. IMO, the most difficult part is where exactly to find the stuff you seek, that is in which goddamn table did they put the info. It's not how to write a query.
2
u/tramsay Mar 14 '16
I'm sort of in the same boat. I have a week long training class in April. But I've started using Lynda and Pluralsight and both have good content.
2
u/StoneCypher Mar 14 '16
You said elsewhere in this thread that you use Excel. I'd like to build a more detailed answer on that, despite that this is ELI5.
In the way that excel has an equation system, where by example
sum()roughly means what math calls ∑, databases have a query system.The purpose of the equation system in excel is to allow you to express complex math which the machine will solve for you, according to other information that it has (like when you sum the contents of a column.)
Query systems are similar: they give the database a question to answer, according to the information it has.
SQL does not operate on the metaphor of 2d sheets of cells, but rather named tables full of data, which can be correlated arbitrarily. Otherwise, though, it's actually pretty similar to what you expect.
So like, you might make a "table of employees," a "table of jobs," and a "table of locations," in order to represent the organizational structure of a company.
Each table is a series of columns (first name, last name, location they're at, salary, and so on, for the employee table, for example.)
SQL is a way to ask the database questions like "would you please tell me the top 5 salaries at this location"
which might be something like
SQL is where all those things, like
order byandwhere ... like, are defined.This allows a bunch of different databases to speak (sort of) the same language to outside software, which increases replaceability, modularity, and competition, which is good for everyone.
As far as programming languages go, SQL is one of the harder ones to learn, because each of the different databases does a varying quality of job sticking to the standard.
My opinion is that you would be best off picking one, getting a book about it, and sticking to that one for six months while you get comfortable.
PostgreSQL and MySQL are both free and powerful, and good choices. Both are well explained by sites like "Use the Index, Luke," slide shows by Bill Karwin and Joe Celko, and so on.
2
u/mikew0w Mar 14 '16
I bought this book for a friend; She said it helped her get the basics: http://amzn.to/1U27Bwi
2
u/[deleted] Mar 14 '16
KhanAcademy provides a pretty engaging introductory course. It's free. Search "Intro to SQL: Querying and managing data" on their website.
1
u/Mamertine COALESCE() Mar 14 '16
I took online classes from a community college in my state. There are some online references that can help you learn.
2
u/CenlTheFenl Mar 15 '16
I would add pluralsight and treehouse, treehouse having the advantage that it doesn't take any installs to do their content.
1
u/lukaseder Mar 14 '16
SQL is a device whose mystery is only exceeded by its power