SQL - how does one learn it

Bambi

I Cleaned My Room - And I am a Dude
Joined
Jun 9, 2003
Messages
2,225
So going back to the thread title, does one need to sign up for a course or can one learn it just by reading books?
 
I would suggest the book Head First SQL. Head First Labs wrote the best book I have ever read on learning C#, so I'd bet this one would be just as good.
 
As an Amazon Associate, HardForum may earn from qualifying purchases.
It depends what you consider "learning" SQL. You could just go to W3Schools and learn the very basics (select, insert, update, delete). As you get more advanced, you'll learn how to use joins, views, temp tables, stored procedures, functions, permission controls, etc etc.

I think that anyone learning SQL should also have a bit of a primer on how relational databases work. When it comes time to use join statements, you'll be glad you have a good grasp of it.
 
Well i do understand relational databases but my MIS program which i graduated from did not cover SQL much, so now i want to learn it while i am unemployed.
 
In what capacity do you want to use SQL? Do you want to do the occasional reporting? Design and develop apps? Become a DBA?
 
So going back to the thread title, does one need to sign up for a course or can one learn it just by reading books?
Either works.

More in terms of reporting.
Start off with the previous to learn the fundamentals of SELECT, WHERE, and JOIN's. Then when you feel comfortable with this and on a sample database, then try it out using a small subset of data on your own database and build on it as you need. To shorten your learning curve, get some guidebooks that are focused on the same database vendor as your company's or business's database. (SQL Server, Oracle, MySQL, etc.)
 
Another vote here for Head First SQL. It is a fast and effective way to learn the basics of SQL. It also does a great job of showing the differences between good and bad database tables. First, Second and Third Normal Forms are all explained well and will help you create your tables correctly the first time and every time.

I swear that every single time I have tried to shortcut the third normal form it has come back to bite me in the ass. Luckily, a great portion of the book is dedicated to taking poorly designed preexisting tables and making them better.
 
I got the HEad First book :) 44 bucks at B&B. Thank you for the suggestions guys.
 
Download a free copy of something like MSSQL express or even MySQL, get some free resources to start learning SQL such as W3Schools and many other websites that offer tutorials, and learn by doing!

The fastest way to learn is to mix traditional study of the core concepts through tutorials/books with a lot of tinkering and playing with actual real world tools, you'll learn a lot very quickly from simply tinkering with some test data.
 
What are the differences between something like MSSQL and MySQL? Different implementations "under the hood" with the same SQL interface?
 
What are the differences between something like MSSQL and MySQL? Different implementations "under the hood" with the same SQL interface?
The answer more depends on what level of database complexity you're looking at; basic ANSI statements and sandbox/sample databases for either platform don't have a whole lot of difference, and you may not even notice a difference.

Personally, I think the out-of-box tools provided with SQL Server (Management Studio, Profiler, etc.) are much more feature-rich than what comes with MySQL.
 
The best way to learn SQL is out of necessity. It's pretty powerful and a lot may not really stick until you find yourself datamining a db for some silly piece of critical information.
 
The best way to learn SQL is out of necessity. It's pretty powerful and a lot may not really stick until you find yourself datamining a db for some silly piece of critical information.

This is true. I learned SQL out of necessity, since our apps are heavily database driven.

My recommendation is to download SQL Server Management Studio Express and play around in that, unless you know for sure you're going to be working on something in the LAMP realm of the web (Linux, Apache, MySQL, PHP/Perl/Python) in the future.
 
I think more CS programs need to have a mandatory database course. I took it as an elective and the knowledge base I gained from it helped me out twice: once from an upper division class where if you didnt know it, you had to learn it on your own and also from my job where from day 1 I was thrown some database reporting tasks, assuming I knew SQL as a college grad.
 
What are the differences between something like MSSQL and MySQL? Different implementations "under the hood" with the same SQL interface?

You don't have to look very far to start seeing differences. There's a 'standard' for SQL but nobody really follows it. Every database ignores parts of it & has their own additions. 80% of the differences are just annoyances but there's a few that are really game changers.

Oracle treats the empty string as a null. MySQL's date handling is downright retarded. Postgres doesn't allow you to give hints to the query optimizer. I'm sure that MSSQL has its own issues.
 
I think more CS programs need to have a mandatory database course. I took it as an elective and the knowledge base I gained from it helped me out twice: once from an upper division class where if you didnt know it, you had to learn it on your own and also from my job where from day 1 I was thrown some database reporting tasks, assuming I knew SQL as a college grad.
I agree. I took it as an elective, but only took it because it was the only elective offered I could take that would satisfy the requirement.
 
The best way to learn SQL is out of necessity. It's pretty powerful and a lot may not really stick until you find yourself datamining a db for some silly piece of critical information.

For almost everything I'd pretty much agree with you, but to be any good at SQL I really think you need a strong grasp of the relational concepts behind an RDBMS that doesn't really come from 'practical' use of one. While some of the concepts will come out from practical necessity, many of them are somewhat obscure and it will be difficult to gain a strong grasp on what is good and will work well from practical use alone.

eon said:
I think more CS programs need to have a mandatory database course. I took it as an elective and the knowledge base I gained from it helped me out twice: once from an upper division class where if you didnt know it, you had to learn it on your own and also from my job where from day 1 I was thrown some database reporting tasks, assuming I knew SQL as a college grad.
Me three. It's also a skill like functional programming - very different from what is typically taught in a comp sci curriculum. Something that's fairly difficult to just pick up on the fly, like a new language or library. My college required both a relational algebra course and the introductory Oracle/SQL course (unfortunately a lot of overlap, but still useful) and plenty of people really struggled with the ideas.
 
I am using a "learning kit" which consists of a book and trial version of SQL Server 2005 in order to pass the MS 70-431 exam in MSSQL Server admin.

My biggest issue is that, although you can play around on the test database, you dont have any real work to do so its hard to become familiar with the software and issues surrounding an MSSQL Server unless you administer one reguarly.

But if you understand the concept of relational dbs you are half way there.

What are the differences between something like MSSQL and MySQL? Different implementations "under the hood" with the same SQL interface?

apart from whats been said, one advantage of MSSQL is that is has a lot of support for .NET languages if you already know one of those.
 
lynda.com has almost anything computer related, it is like a college online. it is not free but it is certainly worth it and the videos are high quality. they have a great iphone app also
 
apart from whats been said, one advantage of MSSQL is that is has a lot of support for .NET languages if you already know one of those.
You'll see this pattern regarding programming languages seemingly prefer certain database platforms, or at least the online and book examples will focus on certain vendors. Good news is that three of the bigger DB vendors (Oracle, Microsoft, MySQL) do have some mature communication drivers specific to many programming languages; as a fallback option, any of them support ODBC connections. The connection strings website can provide some details for the different DB's and other files that you can establish a connection to.
 
You'll see this pattern regarding programming languages seemingly prefer certain database platforms, or at least the online and book examples will focus on certain vendors. Good news is that three of the bigger DB vendors (Oracle, Microsoft, MySQL) do have some mature communication drivers specific to many programming languages; as a fallback option, any of them support ODBC connections. The connection strings website can provide some details for the different DB's and other files that you can establish a connection to.

That website is a Godsend. THANK YOU!
 
Back
Top