Jump to ratings and reviews
Rate this book

Pro Active Record: Databases with Ruby and Rails

Rate this book
Pro ActiveRecord for Ruby helps you take advantage of the full power of your database engine from within your Ruby programs and Rails applications. It walks you through every step from the basics of getting and installing the ActiveRecord library to working with legacy schema to using features specific to each of today's most popular database engines, including Oracle, MS SQL, and MySQL. You'll come to a deep understanding of ActiveRecord that will enable you to truly exploit all that Ruby, Rails, and your chosen database platform have to offer.

304 pages, Paperback

First published January 1, 2007

11 people want to read

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
2 (7%)
4 stars
4 (14%)
3 stars
10 (37%)
2 stars
7 (25%)
1 star
4 (14%)
Displaying 1 - 2 of 2 reviews
Profile Image for James Stewart.
38 reviews6 followers
October 17, 2007
Right at the start of Pro Active Record the authors address a possible problem some may have with it: that there’s not enough in Active Record to warrant a full book. They point out that the basics are well covered as sections elsewhere but that this is the first book to really dig into working with legacy schema and other ‘advanced’ uses. That’s fair enough, but after reading the book I am still left with the question of why, then, they dedicate the first half to covering ActiveRecord’s most basic concepts?

Judging from postings on the rails email list, there’s certainly a lot of confusion about ActiveRecord, associations, observers, how to work with legacy table names and primary keys, and so on. But in a book with a title prefix of “Pro” I was expecting to jump straight into the nitty gritty of topics like compound/composite primary keys and performance tuning, probably with some real world examples, and maybe with a serious exploration of AR’s internals. As it is, such topics only get a quick treatment in the final chapter (the compound/composite primary keys section is a paragraph referring users to http://compositekeys.rubyforge.org).

It’s almost always instructive reading other developers’ code and it would be unfair to claim that I didn’t spot a couple of tips that may prove useful, but they were passing things. And sometimes I found myself wondering what happened to the tech review process, particularly in the coverage of the has_one association, where not only is the variable naming confusing, but they seem to be calling the each method on a single ActiveRecord instance.

I’m left wondering what the audience is for this book. The title and blurbs suggest it’s pitched at people who want to go deeper into ActiveRecord than they have before, but the content is better suited for someone with some database experience who wants to pick up ActiveRecord to write some scripts. As it is, if you’ve worked with ActiveRecord before your time will be better spent writing plugins and exploring the internals for yourself, and if you’ve not you’ll get most of the same material from a decent Rails book and some time exploring.

Disclaimer: I was sent a copy of this book for review by the publisher. You can find it at apress, amazon US, amazon UK and all sorts of other places.
Profile Image for Andypants.
56 reviews3 followers
May 19, 2010
Firstly, this book isn't terribly "pro", really the only audience that can benefit from it would be folks with lots of DBMS experience, lots of SQL experience, lots of ORM experience, but no ActiveRecord experience. I'll grant that it goes more in-depth than the "activerecord chapter" in your typical rails book.

ActiveRecord definitely has enough going on with it to justify an entire book about it, especially when you're new to ruby and trying to make a web application. This book covers a lot of that material, but not well. A lot of things that should be in charts are in prose, and there are a lot of cases where there are 5 options to a method, and they'll cover 4 of them. Why not just go ahead and be comprehensive? Also, most of the "Note"s (remember-me's) that they cover are pretty easily made into non-issues with some really minor integration tests. I mean, have these guys heard of in-memory dbs and integration tests?
Displaying 1 - 2 of 2 reviews

Can't find what you're looking for?

Get help and learn more about the design.