Earlier this year I mentioned that I don’t learn best how to do something new from books. Getting my hands dirty works better from me. However, there’s nothing like a good book to cement and round out your knowledge of a subject once you’re already proficient. Recently I read two books that really helped me in this regard. The first was Jeremy Zawodny and Derek J Balling’s High Performance MySQL, the second was Hibernate in Action from Christian Bauer and Gavin King.

Hibernate is a persistence layer for Java. Basically, you define some mappings from your Java classes to your database, and Hibernate takes care of all of the messy work of generating your SQL for you, not to mention the even messier work of dealing with JDBC. Much as I love SQL, Hibernate is a huge labor saving device, and it makes it a lot easier to deal with your object model in a truly object-oriented fashion. I’ve been using it successfully for real projects for a few years, but I always felt like I was just scratching the surface of what could be done with it. I had also run into some performance issues here and there. Anyway, Hibernate in Action came highly recommended, and deservedly so. Not only does it document Hibernate incredibly well, but it also explains a heck of a lot of the theory behind relational databases and object-relational mapping as well. It’s a truly outstanding book.

I read High Performance MySQL out of desperation. I’ve been using MySQL for a really long time, but recently I had run into some performance issues that I needed to resolve, and I wanted to learn about all of the things I could do to address them. What I learned is that the book should really be called, “How to be a MySQL DBA.” That’s a good thing. The book does discuss indexes, performance tuning, clusterning, replication, and all of the other topics you want to address if your database is too slow, but it also goes into other stuff like backups, security, and how the different database engines work. The explanation of the difference between MyISAM and InnoDB is worth the price of admission alone.

To make a long story short, I recommend both of these books highly. Now I’m going to read a novel.