views:

140

answers:

4

I am looking to learn more about databases (MySQL for starters), particularly about choosing the right approach (e.g. stored procedures vs views and triggers for data aggregation) in a situation.

Maybe this example shows what I mean: Yesterday I asked a general SQL question about aggregation of data and received the answer that "it depends" – which turned out to be absolutely correct. Now I am looking for some database lectures that covers scenarios as opposed to focusing on syntax. Though I encourage everybody to suggest the obvious too, I think the standard normalization / relational stuff is easy to find – personally I am rather looking for practical examples in different kinds of application.

A: 

It's a book, but reads like a tutorial. This is a really good starter:

SQL Visual QuickStart Guide

compie
+2  A: 

Joe Celko's books get, some of them at least, good reviews.

High Performance Mark
+3  A: 

The best book that helped me, without a doubt, was SQL: A Beginner's Guide. This had to be one of the most boring books I've read (very very plain) but I learned so much from it. Very, very useful book, I would not have learned SQL with out it. Bonus is that it teaches you SQL, not MySQL, not T-SQL, not PostgreSQL, not SQL Server: just plain SQL. It does highlight nuances where necessary, but otherwise it's just SQL.

Coincidentally, the second book I read was Beginning MySQL, which was by the same author, Robert Sheldon (I didn't realize it until just now, lol). Again, a very helpful book. I really like Wrox Publishing, they do good books. I would also recommend any book by O'Reilly publishing or Apress as well (can't go wrong with either).

Once you get a handle on the SQL language itself, then you should (need) to read MySQL 5.0 Certification Study Guide, especially if you plan on being a DBA. You'll want to get your CMDBA and this book will help. I just found out the other day at work that there aren't near as many CMDBA's in the country as I thought (I think I heard them say under 1000). We're a rare breed (yes I have my CMDBA), and they pay us well ;)

Lastly, after you have your CMDBA, read High Performance MySQL, the 2nd edition by Baron Schwartz, Peter Zaitsev, Vadim Tkachenko, Jeremy Zawodny, Arjen Lentz, and Derek J. Balling. Zaitsev, Tkachenko, and Schwartz work for Percona (CEO/Founder, CTO/Co-Founder, and VP of Consulting respectively). Percona pretty much has the most brilliant minds in the world when it comes to MySQL, and that's not an overstatement. We've worked with some of them before and words can describe their brilliance.

I hope this helps to maybe give some direction. Good Luck.

desertwebdesigns
+1  A: 

People have mentioned SQL books which is a place for a beginner to start. But there is much more the dba needs to have under his or her belt.

This one is critical, you need to know how to design a database so it can be refactored: http://www.amazon.com/dp/0321293533/?tag=stackoverfl08-20

You need to read a good book on performance tuning for the specifc database backend you use. You will find there are many query techniques to avoid (and they are database specific) and many design structure to avoid. These are things you must know to effectively design a datbase and query against it.

Finally, and again it depends on the database which book to get, you need to get a good book on database admin if you are going to be a dba. There are many things that are not so obvious until you read how to administer.

HLGEM