Microsoft® SQL Server® 2012 T-SQL Fundamentals by Itzik Ben-Gan
Last week I agreed to review Microsoft® SQL Server® 2012 T-SQL Fundamentals by Itzik Ben-Gan, for O’Reilly.
Is it a brave move to produce a book on MS SQL in these times? The thought-leaders are all about big data on the network and sqlLite on the device. Or is now the time of the noSql backlash?
Ben-Gan kicks off with a roundup of set theory, the way sql is non-procedural, and even the famous early days of hybrid industry / academics Codd and Date and ‘third normal form’. Interesting, evocative, and possibly quite useful as background to the way the sql programmer must think.
Then straight into the commands, their application, variance between sql versions, and various gotchas. Whether you find this more or less useful than the online SQL books at msdn.com, probably depends on your preferred learning mode. There are even excercises after each chapter, like in a school book. But I cannot imagine many people would go to the trouble of learning SQL fundamentals without real-world use cases of their own.
His descriptions are absolutely accurate, to my knowledge. The only single challenge I would make, based on my many years of experience with Microsoft SQL server, is to his assertion that online transactional processing and datawarehousing are best kept separate. In fact the superb query optimisation and parallel access handling of MS SQL server has made that untrue long ago.
The debugging tips puzzled me at first: how can a set-based data manipulation language have bugs? Then I remembered my first few long-ago struggles with some of the more complex ways of joining data sets. The issues would almost always revolve around the use of ‘null’ and its non-intuitive behaviour in logical expressions. If Ben-Gan’s advice saves you even a few hours of surfing to resolve such questions, you will have paid for the book.
There is even a section on set up and installation but not back-up strategies. My advice: the database server is SO important that you should either plan everything bottom up round your backup and recovery plans – or keep out of this side altogether and get a provider to take responsibility.
He also runs over locking, deadlocks, trouble shooting and isolation levels. But not the real-life key factors in all this, which is the habits and interoperability of different applications that will be accessing the sql server.
SQL server is a work-horse: far superior to mySql in my opinion and still well worth basing your enterprise-grade applications around. I have been running a business 24/7 on an SQL server non-stop for well over a decade under constant access from websites, internal applications and, yes, even entry-level programmers using fundamental T-SQL. Definitely here to stay for some years yet and a technology you should know.