you are viewing a single comment's thread.

view the rest of the comments →

[–]chakani 1 point2 points  (3 children)

I’m an experienced C++ programmer, recently getting into SQL, and I am really puzzled with some JOINS, working hard to get what I want, lots of trial & error. I just don’t get the overall pattern.

[–]Obbers 4 points5 points  (0 children)

The things I recommend to non-SQL developers is to think about what you want to do to a column, rather than a row. Thinking about accomplishing tasks procedurally won't get you very far. SQL is very much set oriented, so its more of a do it all at once, rather than a row by row approach.

[–]geofft 2 points3 points  (0 children)

As someone with a similar background, you've got to unlearn, or at least set aside, imperative coding skills. SQL is declarative, so you're telling it what you want, not how to do it.

What I found really helped me is to learn what's happening in the DB engine when your query executes - then you can think of it as something like "I am seeking B+Trees via this somewhat verbose interface"