



SQL Server 2000 Stored Procedure Programming
A**R
Not bad, but certainly not great
As an experienced SQL Server developer I have long lamented the number of books on the market that focused on Transact SQL programming. Most books on SQL Server tend to cover a little T-SQL along with a lot more on the administration tools and overall product architecture. When I saw this book (recommended on a newsgroup post for its SQL XML coverage) was available I ordered two copies the same day; one for me and another for a team member on my current project, which is our first production application using SQL Server 2000. When it arrived I sat down and started reading, and was quickly disappointed.First of all, the depth of coverage was severely lacking for a 700-page book. If the publisher had not used such a large font and not included so many redundant screen shots (although I do see the value in illustrating tool use, dozens and dozens of screen shots of SQL Query Analyzer showing the output of stored procedures could have been better served by several text excerpts) this could easily have been a 500-page volume, or had some additional details that would have given the non-novice user a little added value. Based on the size, the title and other reader's reviews I was expecting a much deeper coverage than the book provided.Second, the code samples that were included (please keep in mind that this is one developer's opinion, but those colleagues of mine who have reviewed the book have agreed with me) are among the worst examples of T-SQL code I've ever encountered. The font used (I hope that this is not consistent across this entire book series, as some of the other Osborne titles also look promising) may as well not have been a fixed-width font for how difficult it is to follow. The author's indentation and capitalization are inconsistent with any published SQL or T-SQL standard I've ever seen, and are even inconsistent with the "coding conventions" included in the book. If I were to submit these code samples to a peer code review I would be embarrassed to hand them out; I cannot imagine publishing them to an audience of thousands.Third, and perhaps most significantly, I got the distinct impression that this book started out as "SQL Server 7.0 Stored Procedure Programming" but didn't make it to press before SQL Server 2000 was released, and was hastily updated after the fact. Although there are certainly examples of new SQL Server 2000 features (such as User Defined Functions and the new Table data type) they are extremely lacking in detail; they receive coverage that is cursory even compared to other topics in this book, whereas one would expect them (based on the book's title) to receive more extensive coverage because of their newness.The most significant failure in this regard is the coverage of IDENTITY values, and the techniques used to capture and process them programmatically. The author spends seven complete pages (449-555) discussing different workaround techniques to capture the IDENTITY value generated by an INSERT operation (such as using sequence tables instead of IDENTITY or storing the IDENTITY value in a temporary table) where that value would be lost if a trigger on the base table also inserted into another table with an IDENTITY column. While this is certainly a valid topic (and a traditional sore spot for SQL Server developers) SQL Server 2000 provides two new system functions IDENT_CURRENT() and SCOPE_IDENTITY() that make @@IDENTITY and the author's workarounds obsolete. The fact that the author was (is?) unaware of this very relevant new functionality makes it very difficult for me to take the rest of the book seriously; how much else was he unaware of, and how many other serious omissions or errors did I miss when reading?Now with all of this said, I'm still giving the book three stars, although I was tempted to give it two. It's not an inherently bad book, but is certainly not (again, this is simply one developer's opinion) the "awesome" or "excellent" book that some of the other reviewers would have you believe. If you are a novice or intermediate SQL Server developer you will certainly benefit from reading this book. If you are an advanced developer, you will likely be better served by looking for another book. I've just ordered "Advanced Transact-SQL for SQL Server 2000" by Itzik Ben Gan and Thomas Moreau and "Inside Microsoft SQL Server 2000" by Kalen Delaney (if only I'd known that this one was out when I placed my order, as Kalen Delaney is simply the goddess of the SQL Server world) and am hoping that one of these books is what I expected "SQL Server 2000 Stored Procedure Programming" to be.
A**R
A gem of a book
Sunderic and Woodhead have written a gem of a book that can earn on place on almost every SQL Server 2000 developer's bookshelf, if not desk. Whether you are an experienced developer new to SQL Server, or an old hand upgrading to 2000, SQL Server 2000 Stored Procedure Programming will introduce you to the features you need to know about. The writing style is clear and easy to read, and the explanations clear, concise and comprehensive.The book starts with 3 chapters on the basics of SQL Server 2000. While not strictly necessary in a book aimed at developers merely upgrading to SQL Server 2000, it does ensure that the book is accessible to a broad range of developers. I believe any developer with a year or two of experience with SQL can pick up this book and get full value from it. However, even experienced developers should read these chapters; some of SQL Server 2000's new features are first explained here.Then we progress steadily into more detail of the SQL Server 2000 environment. The role of stored procedures in a scalable, high-volume environment is outlined along with an explanation of the tools available for designing, building and maintaining them. The TSQL language is outlined and the proper roles of batches, scripts and transactions is detailed. Throughout these chapters the new features of SQL Server 2000 are described, and their effect on recommended practices provided. Professional habits of error handling, debugging, and source-code management are described. Through a full and detailed understanding of the parts, we prepare to understand the whole.The real meat of the book is chapters 9 through 11. Almost a third of the text is here, discussing Stored Procedures, Triggers, and User-Defined Functions; Locking Strategies, Dynamic Queries, Nested Stored Procedures, and Use of Identity Values; COM and Web Interfacing, Job Administration, Email, Database Deployment, and Security; all of these and more are discussed in sufficient detail to provide a good grounding in their capabilities and limitations. Throughout these chapters, as for the entire book, the emphasis remains on professional practices and usages that demonstrate how to write "code for the ages". Code that will scale well; code that is easy to read, diagnose, and repair when problems arise.The book concludes with an excellent chapter on XML support in SQL Server 2000. It starts with a summary of XML, DFDs and Schemas, and Style Sheets, sufficient to allow a reader new to XML at least follow along with the discussion. Then it goes into details of why and how to receive recordsets from SQL Server 200 in XML, so as to facilitate publication to The Web or an intranet. The ease with which customization, and translation into HTML, can be accomplished is readily apparent from the authors' explanation. Any developers new to XML, who desires to easily publish database content, will find this chapter an invaluable introduction.A consistent thread through the book is "Professional Development". The examples, with occasional exceptions, are clearly adapted from real programs. The authors not only explain proper techniques for trapping, throwing, and reporting errors; they steadily lead by example. Developers in any scripting language, who think that consistent error checking is tedious or unnecessary, would do well to heed the authors' example.The book is not without flaws; two handfuls of minor typos could have been caught before printing. The most annoying, however, is Osborne's insistence on setting the code examples in a large typeface, double-spaced. While from their standpoint it bulks up the book a bit, it is most irritating for readers when a code sample stretches over several pages unnecessarily. For the longest examples, it almost makes them unreadable on paper. Fortunately, they are available online for more comfortable study. SMARTEN-UP OSBORNE!In Chapter 8, "Developing Professional Habits", Sunderic reveals his likely 'project', rather than 'product', orientation. I disagree on his dismissal of "pinning" in Visual Source Safe, because I believe it is a better way to manage configuration in a product-oriented environment. But the issue is peripheral to the book, and probably moot for those readers working in a project-oriented environment.One particularly nice feature is the use of boldface in the examples to highlight the point being illustrated. In lengthy examples, one can immediately pinpoint the code being discussed, and then expand one's focus to the surrounding code. It significantly improves the readability of the lengthy examples. Good Work.In conclusion, this book was a most enjoyable read that I expect to keep by my desk for quite some time.
J**I
Mediocre, but has a few bright spots
I'm not sure whether this book was a good purchase. Most of the stuff it contains is already in the product documentation. There are a few bright spots, however, so I wouldn't say the book is a complete waste of time. The thing that really surprised me about it was how thick the paper was - I thought the book was really more substantial than it is. I guess I'd rank this as a beginner's guide. If you're new to TranactSQL procedural programming, it might be useful to you.
TrustPilot
1天前
2 周前