Review of ADO.NET 4 Step by Step

Microsoft has created a plethora of database technologies over the years. The managed form of ActiveX Data Objects (ADO) is just another in a long series of ways to access data from within an application. Because some older technologies, such as Open DataBase Connectivity (ODBC), are so entrenched, there isn’t any way that a single book can tell you everything there is to know about working with databases from a Microsoft perspective. When you add in all of the potential database products (SQL Server, MySQL, AskSAM, Oracle, DB2, and many, many others), the task becomes impossible. So, when I reviewed this book (supplied to me by the publisher), I didn’t consider completeness from the perspective of providing a single source solution to database management. In fact, given 25 years of experience, I feel that such a book is impossible to write—at least as a single useable volume. When shopping for a database management book, be sure you look for a book that covers both the required access technology (such as ODBC, ADO, or ADO.NET) and the database manager (such as SQL Server or MySQL) that you need for your project.

Tim Patrick has written ADO.NET 4 Step by Step with ADO.NET and SQL Server in mind. In fact, the book is incredibly focused and I applaud the author’s single minded devotion to this combination of technology and product. Other database books I’ve read just don’t seem to get the idea that watering down the message won’t work. While it might be possible to include multiple products in a book, trying to cover multiple technologies seldom works because there is too much to discuss and, even if the author successfully writes about each technology in an unbiased way, the reader tends to become confused. So the first thing you must know about this book is that it’s strictly about ADO.NET and SQL Servertry another book if you need any other combination.

This is the second Step by Step book that I’ve reviewed (see Review of HTML5 Step by Step for details of the other review). As with that other book, this book is heavy on hands on involvement and light on theory, which is just fine because many people learn better using hands on tasks. However, database management is a more complex task than creating a Web page because you have data integrity rules and other issues to consider that simply don’t come into play when working with a Web site. (To be fair, Chapter 12 does discuss data integrity, but mainly from a hands on perspectiveyou end up understanding how, but not what, why, or when.) I mention this because the hands on approach in this book does help you create applications fast, but it doesn’t provide you with everything you need to know to create good applications. For example, the discussion of ADO.NET components consumes a scant two pages. Database normalization is covered in a two paragraph sidebar in Chapter 2. The author is cramming a huge amount of theory in an incredibly small space and glossing over a lot of details. I would have liked to have seen some notes, tips, or sidebars with online resources as a minimum so the reader could fill in the missing theoretical details later.

The best part about this book is the activity. I was able to create a basic application in less than an hourfar faster than any other book I can remember using, even my own books. By the time you reach the end of Chapter 1 (about 15 pages), you’ve already learned how to create a connection to your data. Chapter 2 has you creating tables using several different techniques.

I loved the quick references at the end of each chapter. They act as a quick method of ensuring you got all of the details out of each chapter. If you read the entire chapter, you can go back to the quick reference later as a reminder of the things you learned.

Patrick provides a relatively good discussion of every aspect of managing the database and the information it contains using both C# and Visual Basic examples. Support for both languages is a good addition to the book. In addition, the support isn’t sporadic as it is in many books that favor one language or the otheryou’ll find most information discussed equally in both languages so neither language feels like a second class citizen.

Chapter 8 does discuss external connectivity, but it feels like Patrick is discussing the topic from the perspective of the developer who normally uses ADO.NET exclusively, which is absolutely correct for this book. You’ll discover how to interact with OLE DB and ODBC data sources. Unfortunately, as with many other areas of the book, the author digs right into using the connections without providing any theory whatsoever. This is another area where it would have been nice to have resources provided so that the confused reader could learn more. Still, everything works as promised, so there is something to be said for that. Many readers don’t want to know how it works, they simply want to know how to do something black box style and this chapter fits in perfectly with that mindset.

For me, the highlight of the book was Chapter 16. In this chapter, the author cuts through all of the usual garbage associated with objects and shows the bare essentials to use technologies such as LINQ. This is possibly the shortest, yet best conceived, coverage of the topic that I’ve seen anywhere. Again, you’ll find yourself lacking theoretical details, but the how discussed in an elegant way that will enable most readers to make use of these newer technologies in an incredibly short time. In fact, Part IV of the book goes on to cover LINQ in detail. I’m convinced that LINQ will eventually become the data query technique of choice because it’s relatively easy to understand, requires little code, and generally produces optimized results with little effort on the part of the developer. Obviously, the author agrees with me on this matter.

Overall, ADO.NET 4 Step by Step is a fantastic book for teaching you the “how” of database management using SQL Server and ADO.NET. In fact, you’ll learn how to perform many tasks that other tomes simply leave out. However, if you want to know why you’re doing something, when to do it, or understand the theory behind a task, you’ll need another book. I recommend this book to anyone who wants to get started quickly. You can always obtain a theoretical book to fill the gaps in your knowledge and you experience programming scenarios you don’t understand. The best addition the author could make to a next edition is some online sources to help the confused reader. Writing a database management book is tough, but it’s important to recognize that there are limits to what you can do and provide the reader with help in overcoming those limitations.