[GLLUG] Learning SQL

Andy Lee ALEE at courts.mi.gov
Mon Mar 27 08:02:41 EST 2006


I concur with the others that books are not really necessary for learning SQL, but if you need a book, SQL for Smarties is the best learn SQL from scratch book I've seen. That said, start with googling SQL tutorials to see how it looks. You'll likely be amazed at how simple SQL is, at least to get off the ground with what most people do.

I have to disagree with the comment that you shouldn't worry about SQL and just hide it behind an abstraction layer. My experience has been that those generic abstraction layers are harder to use than writing good optimized custom code. I do agree that you don't want data access code floating around with your presentation code, but, you can see substantial performance improvements if you really learn SQL. I've seen some nasty code from people who only know how to do simple selects, and have to code loops with multiple hits to the DB where a join would have worked. I've also been able to take queries from requiring 5+ minutes execute, to under 5 seconds just by properly ordering the clauses, and knowing what indexes to add. If you are going to be doing database programming, it is worth your time to learn how to do it right, especially when the language in question is so dang simple!

-- Andy






More information about the linux-user mailing list