Beginning SQL?
$ynergy writes "I have been seeing more and more job listings for SQL programmers so, naturally, my interest as been sparked. I have picked up a few materials but, soon realized that it would be easier to apply if I had experience using database software. Would everyone agree? So I am looking for resources, online or in print, that would give a beginner a real in depth look at using database SW." There are at least two issues here: a) learning standard SQL (pick a standard, any standard :) and b) learning all the idiosyncracies of a particular database system. Probably learning basic SQL is the way to start.
Phillip Greenspun's book SQL for Web Nerds is a very nice introduction to SQL. It would be a good idea to grab a copy of PostgreSQL or one of those Oracle demo cds that are as common as AOL cds, and work through the exercises in it.
Please avoid MySQL if you are just learning SQL. You'll just have to unlearn all of the workarounds for the features (such as real transactions, and referential integrity to name two) which it is missing when you move to a real database.
My favorites are:
www.sqlcourse.com
www.sqlcourse2.com
These are good beginner sites that allow you to practice through a java app.
iRepairIT - iPhone, Mac, & PC Repair
Well that is kinda why people flame MySQL so much (*). In PostgreSQL and Oracle you have triggers and things like pl/sql and much more that I don't know about. Basically you can put a lot of the business logic in the database and use features that tie records together and protect against accidental deletions. Basically imagine another layer that handles a lot of checks and balances that free you from having to do the same in your perl/php/tcl/whatever code.
That's why I have learned so far...
* Plus of course ACID and all that other stuff that some people really love to argue about.
Load a billion records into your MySQL database through 20 tables, then do random 10 table joins. Thats why.
Postgresql doesn't do quite as well as Oracle (much much smaller gap now though) but it has a smaller starting size.
Rod Taylor
There is an amazing SQL book by Graeme Birchall called DB2 SQL Cookbook, downloadable as an PDF. It contains all the funky stuff you can do with SQL on DB2. DB2 is pretty close to the ANSI SQL standard so a most of the stuff should work on other databases as well... The url is: "http://ourworld.compuserve.com/homepages/Graeme_B irchall/HTM_COOK.HTM