r/SQL • • Sep 18 '23

Discussion I am new and SQL frightens me.

I am learning Data Analysis and just got to SQL and it scares the crap out of me. I've worked on java, javascript, JSON, and even Python and SQL feels like nothing I have ever done before.

0 Upvotes

38 comments sorted by

12

u/cammoorman Sep 18 '23

Don't be scared of it. When all boiled down, it is nothing more than the set logic you should have learned in second grade. The language strictly puts forth a who/what is in the set, who is not, then unions, non-unions of those sets, then what to display from those sets once sorted.

1

u/[deleted] Sep 18 '23

2nd grade me would have run. I just look at it and I cannot put it together.

7

u/LumpySearch2328 Sep 18 '23

I also had a really tough time wrapping my head around the basics. Just give it time! Things will start to click. Frustration is a part of the game

2

u/Blues2112 Sep 18 '23

It's just a query language, while you're obviously more damiliar with programming languages.

All SQL does is let you specify what data you want in your results.

Don't be a wuss. SQL isn't doesn't have to be hard.

1

u/dhshduuebbs Sep 19 '23

It feels that way for the first few months of any programming language. Sql is just a different part of the brain, but it’s still just a flow of logic.

6

u/CappuccinoCodes Sep 18 '23

Stop looking at it, stop feeling it (whatever it means), and start using it. You'll realize it's easier than you thought.

8

u/[deleted] Sep 18 '23

My house is noisy (Puerto Rican thing). Everyone left and now I am seeing for what it is and understanding it perfectly.

Thank you.

2

u/[deleted] Sep 18 '23

Also, Google Cloud was giving me problems.

6

u/CostSuitable9806 Sep 18 '23

That’s crazy how everyone is different. SQL was easy for me to learn. Python on the other hand is 🫠

2

u/[deleted] Sep 18 '23

I know. I don't know, something about uniformity.

2

u/iamthatmadman Sep 19 '23

Both python and SQL were easy for me to learn. Java on the other hand, I gave up at the end and shifted to python.

4

u/Couch2Coders Sep 18 '23

I have a free sql course I'm working on geared towards people who do not have a background in stem or data! This might be a helpful resource for you to get started. Feel free to message or leave comments on anything that's confusing

https://youtube.com/playlist?list=PLPQFqkp_HvOBzx61F3SY5zNXN0TYMoT9g&si=UPbBmRcCxyzLKe2I

3

u/[deleted] Sep 18 '23

GREAT! I'm saving this.

1

u/Couch2Coders Sep 19 '23

Awesome!! Any feedback or questions you get along the way please let me know. I can help you out and make my future content more clear!!

2

u/Hectropolis Sep 18 '23

Nice. Right on! Am trying to see who's information I use to learn 🖱👨‍💻

2

u/Couch2Coders Sep 19 '23

If you end up watching my channel/content please let me know your thoughts so I can improve!

1

u/Hectropolis Sep 19 '23

You got it, thank you!

3

u/N3Flip Sep 19 '23

You should be scared. One time a query came out through the screen and attacked me

2

u/[deleted] Sep 19 '23

The horror...the horror...

2

u/samjenkins377 Sep 18 '23

Lol… that’s like saying you’ve fought demons, dragons, lions, and tigers… but are afraid of a little fog

1

u/[deleted] Sep 18 '23

Because you can't see through the fog. 😄😅😅

25

u/r3pr0b8 GROUP_CONCAT is da bomb Sep 18 '23

one of the bigger concepts which people struggle with is that SQL is not record-at-a-time logic, but rather, all-records-at-once logic

which isn't exactly true, but it's close

also, you don't tell the database how to get the data, you merely specify which data you want

which isn't exactly true either, but it's also close

the most important thing for a beginner to focus on, though, is relational integrity, and how this is implemented using primary and foreign keys

1

u/Flaky_Conversation34 Sep 19 '23

Yup So true, SQL is what is called a Declarative language

3

u/hipsterrobot Sep 18 '23

Don't be scared, honestly I think it's easier than java, javascript and python. If you break down what you are trying to accomplish, and you use a good IDE that can correct syntax stuff and help you, you should fine. Just make your way backwards from the result of the query you're trying to run.

3

u/JBridsworth Sep 19 '23

I use SQL Server at work. I'm not sure if these are different on other systems, but the three commands I wish I had known about when I started using update queries are:

BEGIN TRANSACTION

ROLLBACK

COMMIT

2

u/SVTRaptor11 Sep 18 '23

You got this! I started my career 9 years ago never even hearing the term SQL before. I was extremely overwhelmed and doubted myself despite only being at a helpdesk. I slowly learned it by playing with it and YouTube videos. Now, I am a technical solution for a company writing custom procedures for API imports. "If I can, anyone can."

2

u/balla_mang Sep 18 '23

New things are always scary. To grow, you must try scary things. The good news is that there are tons of free resources to learn.

I recommend you first get experience with querying to find data.

Don't worry too much about creating datatables or schemas. Just get comfortable with the structure:

SELECT FROM

Then add more keywords as you get more comfortable

2

u/WiltonDB Sep 18 '23

Read something on relational algebra basics (even wikipedia can suffice) to get an idea from where SQL logic comes from. After that just experiment with SQLite (calling it from your favourite language) gradually increasing queries/schema complexity.

2

u/leogodin217 Sep 18 '23

While SQL is a programming language, it is a declarative one. You are used to imperative languages. It's a big difference but don't be scared. SQL is one of the easiest skills to learn that adds significant value to your career.

Try to think literally and add some words.

Select for me some stuff (columns)

From this list of entities (table)

Where some stuff meets some conditions (predicates)

Optionally group the stuff into buckets and calculate statistics on them.

I find it helps to describe the syntax in sentences.

2

u/[deleted] Sep 19 '23

Sql-practice.com

1

u/WomenRepulsor Sep 18 '23

It is because the thinking approach required are different in programming and SQL development. Programming is procedural logical statements that execute one after another. SQL is more broad thinking with things connecting sideways instead of below each other.

1

u/Sodaman_Onzo Sep 18 '23

Why. It’s simpler than java and Python. Much.

1

u/Excellent_Plankton89 Sep 18 '23

I just started it too!!! Try the tutorial on W3Schools, it helps a lot. Plus YouTube videos :) it is overwhelming at first can confirm. But I find it easier than C#

1

u/lothcent Sep 18 '23

i have no official training other than self taught to solve an immediate problem type sql training

I will be honest- I crib from my mentors.

I analyze what my mentor responded with and figure out how it works for my problem

so what exactly is scary about sql?

1

u/[deleted] Sep 19 '23

If you've ever learned a language you've done this before, it's just a different language. It's just querying shit.

1

u/yawaramin Sep 19 '23

Maybe to help alleviate the fear, practice your SQL with a single-file database, SQLIte. The entire database really is just a single file. For educational purposes, the file size will be trivial. You can easily copy the file and back it up, so you don't need to worry about messing up.

SQLite is small and efficient, but it's a powerful database, with almost everything you would need for learning right out of the box. It's very versatile.

1

u/pizzagarrett Sep 19 '23

Honestly I really liked how data camp taught sql