I am trying to learn SQL, to work with MySQL. The main part I am having trouble with is getting my head round relationships (Querying, Updating and linking different tables together etc etc). What book do you recommended for learning SQl that maybe has a tutorial flow?
It isn't specific to MySQL, but an excellent book for understanding relational databases is _An Introduction to Database Systems_ by C. J. Date. Reading that (even just the first several chapters, and then others as needed) will help you understand the mindset behind both SQL and relational databases in general. While I had figured out the basics of SQL on my own, I found that getting the big relational ideas made it much clearer why some schema designs are better, the intent behind some aspects of SQL that seemed strange, etc.<p>It has a new edition published every couple years (it's a textbook), so you can usually get the previous edition for quite cheap.<p>Also, note that a lot of the books on SQL deal specifically with MySQL, SQL server, etc., and don't always make it clear which aspects are the implementation vs. which are standard SQL. (I was learning with SQLite and Postgresql, so I probably got bit by this more than you will.)
I actually recommend playing with sqlite. It's fast and easy to setup. You can work with it via command line or use a web browser plugin.<p>I can also recommend Mike Owens' book <i>Definitive Guide to SQLite</i><p><a href="http://www.amazon.com/Definitive-Guide-SQLite-Mike-Owens/dp/1590596730/" rel="nofollow">http://www.amazon.com/Definitive-Guide-SQLite-Mike-Owens/dp/...</a>
Joe Celko's "SQL For Smarties" and "SQL Puzzles and Answers" are classics in the field. They're still very relevant despite being 10+ years old, since SQL hasn't changed anywhere near as much as, say, Java in that time.<p><a href="http://www.celko.com/books.htm" rel="nofollow">http://www.celko.com/books.htm</a>
Skip the book. Find, read, and 'do' a few online tutorials, and you'll know over 90% of what you need to get going. Pick one specific to your engine of choice (MySQL in this case, it seems) and just go with it.
fromthat other site<p><a href="http://www.reddit.com/r/programming/comments/7n9q8/ask_proggit_what_are_some_good_books_for_learning/" rel="nofollow">http://www.reddit.com/r/programming/comments/7n9q8/ask_progg...</a>