For all the buzz about trendy IT techniques, data processing is still at the core of our systems, especially now that enterprises all over the world are confronted with exploding volumes of data. Database performance has become a major headache, and most IT departments believe that developers should provide simple SQL code to solve immediate problems and let DBAs tune any "bad SQL" later.
In The Art of SQL, author and SQL expert Stephane Faroult argues that this "safe approach" only leads to disaster. His insightful book, named after Art of War by Sun Tzu, contends that writing quick inefficient code is sweeping the dirt under the rug. SQL code may run for 5 to 10 years, surviving several major releases of the database management system and on several generations of hardware. The code must be fast and sound from the start, and that requires a firm understanding of SQL and relational theory.
The Art of SQL offers best practices that teach experienced SQL users to focus on strategy rather than specifics. Faroult's approach takes a page from Sun Tzu's classic treatise by viewing database design as a military campaign. You need knowledge, skills, and talent. Talent can't be taught, but every strategist from Sun Tzu to modern-day generals believed that it can be nurtured through the experience of others. They passed on their experience acquired in the field through basic principles that served as guiding stars amid the sound and fury of battle. This is what Faroult does with SQL.
Like a successful battle plan, good architectural choices are based on contingencies. What if the volume of this or that table increases unexpectedly? What if, following a merger, the number of users doubles? What if you want to keep several years of data online? Faroult's way of looking at SQL performance may be unconventional and unique, but he's deadly serious about writing good SQL and using SQL well. The Art of SQL is not a cookbook, listing problems and giving recipes. The aim is to get you-and your manager-to raise good questions.
Review By: Garry Archer 06/23/2010"The Art of SQL" is not a book for the faint of heart or the SQL neophyte. You had better know your stuff if you wish to have any chance of understanding or absorbing the content of this bible of SQL optimization. It is definitely a book for the advanced SQL coder/administrator, and I found the author’s approach to problem solving and database tuning invigorating.
The author, Stephane Faroult, strongly emphasizes coding that does the best job in the most efficient way possible. His references to military scenarios offer an alternative perspective to the technical side of database coding. The SQL coding examples are not ones the average coder would use when optimizing code, but they offer a sound base on which any SQL guru can build. The book's objective is to make one a better SQL coder, both as a developer and an administrator, and Faroult captures this in an explosive way.
The book is organized into chapters that deal with the subject matter in blocks of relevance, which follow a structured pattern—from design and preparation of relational databases to the optimization of the code and tweaking of the SQL optimizer at the server. The author explains not only the how but also the why of designing and creating SQL in a manner that goes beyond "SQL 101." He uses references and examples that are designed more around an Oracle-based system, yet a DBMS administrator with a sound knowledge of transactional SQL (e.g., Microsoft SQL Server) should be able to tweak the code and put these examples to work.
The author’s writing style is to the point—technical and yet not too intense. The references to war add a touch of flare but do not mask the overall theme. Although many examples may not seem relevant at first, it doesn’t take long to realize that he is right on the money. Even when the lingo appears confusing, it only requires a little more study to get the message.
The text does not appear to have suffered in any way in its translation to English, and kudos should be given to those assisting him with this task.
Faroult’s presentation of the subject matter is excellent and refreshing, with plenty of powerful coding examples that, he admits, are a little daunting at first glance. His detailed points are presented in such a way that any confusion the reader may have is soon clarified. Although the layman might seem a bit overwhelmed when reading this book, he would do well to add it to his arsenal for future reference as his skill set develops.
Stephane Faroult sets his sights and fires from the hip with The Art of SQL, a dramatic attack on poorly designed SQL code/databases. Faroult challenges you to become a better SQL administrator/user by taking you through the twists and turns of bad code examples and scenarios—all the while lending you his many years of experience as an SQL master.