[GLLUG] Learning SQL

Jeremy Bowers jerf at jerf.org
Sun Mar 26 19:39:28 EST 2006


Caleb Cushing wrote:
> I want to learn SQL probably MySQL at first. Does anyone know any good 
> books on for learning SQL. Also is SQL kind of like Linux in the fact 
> that there are many distributors of it, that vary in features and 
> complexity. But otherwise similar? o'reilly has a couple of books, 
> Learning SQL and High performance MySQL they also have MySQL in a 
> Nutshell, but if the other nuthshell books are any indication these may 
> be to complicated for me.

I actually do *not* recommend learning SQL from books, when there are so 
many good free tutorials available.

I believe the one I learned with, which despite the date on it still 
fully applies, is at 
http://www.geocities.com/SiliconValley/Vista/2207/sql1.html , but I note 
a lot of good resources for googling "SQL tutorial" seem to come up now. 
(Years ago, that was the only decent one.)

SQL is a standardized language, like C, and "learning MySQL" is exactly 
like saying you're going to learn "gcc", in the sense you mean. (I say 
this by way of explanation, not to be offensive.) Every database has 
their own quirks, special features, and oddities of SQL support (think 
C++ compilers of 10 years ago), but the best thing to do is learn the 
SQL you need to know, then learn about the quirks of the database you're 
going to learn. A good SQL tutorial + the standard MySQL documentation 
is probably the best bet, if you're going to be using MySQL.

Also see the MySQL Gotchas list, if you're going to be using MySQL: 
http://sql-info.de/mysql/gotchas.html

Once you do this with the free resources, you'll be in a much better 
position to decide if you need to spend money on something more 
sophisticated.

Finally, I'd point out that once you learn SQL, the first thing you want 
to do with it is stick it behind an API layer and try to forget about it 
as much as possible; the less actual embedded SQL code you have for a 
given set of features, the better. There are many good or great layers 
you can use to avoid programming SQL directly, depending on the language 
you are going to be working in, and while it's almost certainly worth 
your time to know how the layers are interacting with the database so 
you can use an SQL passthrough for optimization, it may not be worth 
your time to become an SQL expert if you can just use Hibernate (java) 
or some other such layer.


More information about the linux-user mailing list