Join Amazon Prime and ship Two-Day for free and Overnight for $3.99. Already a member? Sign in.
The Art of SQL and over 300,000 other books are available for Amazon Kindle – Amazon’s new wireless reading device. Learn more

 

or
Sign in to turn on 1-Click ordering.
 
   
More Buying Choices
40 used & new from $24.68

Have one to sell? Sell yours here
 
   
The Art of SQL
 
 
Start reading The Art of SQL on your Kindle in under a minute.

Don’t have a Kindle? Get yours here.
 
  
4.7 out of 5 stars See all reviews (18 customer reviews)

List Price: $44.99
Price: $29.69 & this item ships for FREE with Super Saver Shipping. Details
You Save: $15.30 (34%)
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.

Want it delivered Tuesday, July 7? Choose One-Day Shipping at checkout. Details
27 new from $24.69 13 used from $24.68
Also Available in: List Price: Our Price: Other Offers:
Kindle Edition (Kindle Book) $26.72
Digital (Download: PDF) $35.99 $35.99
Like this book? Find similar titles from O'Reilly and Partners in our O'Reilly Bookstore.

Frequently Bought Together

Customers buy this book with SQL Cookbook (Cookbooks (O'Reilly)) by Anthony Molinaro

The Art of SQL + SQL Cookbook (Cookbooks (O'Reilly))
Price For Both: $56.06

Customers Who Bought This Item Also Bought

SQL Tuning

SQL Tuning

by Dan Tow
4.7 out of 5 stars (15)  $26.37
Database in Depth: Relational Theory for Practitioners

Database in Depth: Relational Theory for Practitioners

by C.J. Date
4.1 out of 5 stars (19)  $26.95
Learning SQL

Learning SQL

by Alan Beaulieu
4.3 out of 5 stars (26)  $26.39
SQL Hacks

SQL Hacks

by Andrew Cumming
4.3 out of 5 stars (6)  $19.79
Joe Celko's SQL for Smarties: Advanced SQL Programming Third Edition (The Morgan Kaufmann Series in Data Management Systems)

Joe Celko's SQL for Smarties: Advanced SQL Programming Third Edition (The Morgan Kaufmann Series in Data Management Systems)

by Joe Celko
4.1 out of 5 stars (49)  $38.40
Explore similar items

Editorial Reviews

Product Description
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 numberof 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.

About the Author
Stephane Faroult first discovered relational databases and the SQL language back in 1983. He joined Oracle France in their early days (after a brief spell with IBM and a bout of teaching at the University of Ottawa) and soon developed an interest in performance and tuning topics. After leaving Oracle in 1988, he briefly tried to reform and did a bit of operational research, but after one year, he succumbed again to relational databases. He has been continuously performing database consultancy since then, and founded RoughSea Ltd in 1998.

Graduated in geology from Durham University (1968), then taught at Edinburgh University, obtaining an M.Phil in geology 1975. Worked in Greece as a geologist (1973,74), and then in University of Newcastle specialising in geological databases. Joined the British Geological Survey 1980, and has steered the organisations' use of database ever since, as data architect and database administrator. Has worked with databases since 1977, relational databases since 1981, and Oracle since 1985. He has lectured widely in the UK on geological aspects of database and has specialised on aspects of the SQL system as well as data modelling from the corporate architecture down to the departmental level. He has presented at various Oracle database conferences both in the UK, Europe and North America. Currently a director on the board of the UK Oracle Users Group.


Product Details

  • Paperback: 367 pages
  • Publisher: O'Reilly Media, Inc.; illustrated edition edition (March 1, 2006)
  • Language: English
  • ISBN-10: 0596008945
  • ISBN-13: 978-0596008949
  • Product Dimensions: 9.1 x 6.9 x 0.9 inches
  • Shipping Weight: 1.3 pounds (View shipping rates and policies)
  • Average Customer Review: 4.7 out of 5 stars See all reviews (18 customer reviews)
  • Amazon.com Sales Rank: #56,235 in Books (See Bestsellers in Books)

    Popular in these categories: (What's this?)

    #23 in  Books > Computers & Internet > Databases > Relational Databases
    #93 in  Books > Computers & Internet > Databases > Database Management Systems

Inside This Book (learn more)

What Do Customers Ultimately Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
Check the boxes next to the tags you consider relevant or enter your own tags in the field below.
(4)
(1)

Your tags: Add your first tag
 
Help others find this product — tag it for Amazon search
No one has tagged this product for Amazon search yet. Why not be the first to suggest a search for which it should appear?

 

Customer Reviews

18 Reviews
5 star:
 (15)
4 star:
 (1)
3 star:
 (1)
2 star:
 (1)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.7 out of 5 stars (18 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
17 of 18 people found the following review helpful:
5.0 out of 5 stars Clear and straightforward explanations, August 25, 2006
By E. Wuehler (Portland, OR) - See all my reviews
(REAL NAME)   
The Art of SQL is a truly unique book. In sharp contrast to many other database books on the market, this one does not endeavor to provide an exhaustive SQL reference guide, a low-level vendor-specific DBMS implementation description, or a cookbook-style collection of FAQs. Instead it explains, in incredibly straightforward and clear language, how to think about SQL, schema design, and DBMS operation in general and apply that knowledge to real-world situations. It provides simple mental models for the inner workings of most modern database systems along with concrete examples of how these mental models can be used to speed up queries and design better-performing schemas.

Throughout the book many commonly encountered design patterns query requirements are discussed, such as tree or hierarchy-based data structures, name/value pair tables and various common types of selection filtering and aggregation. For each of these, multiple implementation options are described and evaluated, with the pros and cons of each approach explained. This book assumes the reader is proficient at forming SQL statements, and thus spends its time exploring how restructuring tables and indexes or reforming queries can affect performance. There is a stronger focus on schema design considerations rather than query structure optimization, which I really appreciated because many SQL references focus almost exclusively on the latter.

There are also a number of rather complicated real-world examples sprinkled throughout the book. These are carefully analyzed using the concepts presented in their respective chapters. The idea here isn't that the reader might encounter these exact problems in their projects, but rather to illustrate the process of applying the book's concepts to a concrete problem.

This book is for the most part database vendor agnostic, but still manages to do a great job of explaining the inner workings of databases in a clear, concise manner. In my opinion, it goes to just the right level of detail in explaining things like physical table structure, indexing implementations, locking and the query optimizer. The explanations are simple enough and general enough for mere mortals to internalize, yet still provide a powerful framework for thinking about and improving database performance. Chapter Four, which discussed relational theory and how it relates to SQL, was one of my favorite chapters and serves as a perfect example of this book's ability to provide easily understandable theoretical concepts and tie it in to database implementation and its consequences on query performance against an example table structure.

The Art of SQL is not a beginner's book, and is not an Oracle reference. What is does, however, is provides a conceptual underpinning between these two extremes that will enable database administrators to effectively formulate battle plans against whatever challenges lie in their path. I wish this book had been around when I was learning databases!
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
16 of 17 people found the following review helpful:
5.0 out of 5 stars Thinking in SQL- A definitive guide, August 5, 2006
By Adnan Masood (Monrovia, CA, USA) - See all my reviews
(REAL NAME)   
SQL being a declarative style language is intuitive in simplicity, and yet, the instincts are not enough when you enter the labyrinth of complex problems. From an application developer's prospect, I'm familiar with different mindsets of programmers. Those who despise writing SQL beside CRUD statements and consider it a lowly languages, to those who religiously believe the business logic should reside in business objects (hence the name) and the lingua franca of database should not contain any of the rules despite the performance gains. Then there is SQL zealots who prefer to write virtually everything in SQL and would like to use high level algorithmically sophisticated languages as sheer callers. Nevertheless, SQL is ubiquitously essential part of a developer's everyday life and "The Art of SQL" by Stephane's Farlout the best thing after SUN-TZU's "Art of War" in the SQL warfare.

"The Art of SQL" is theory and practice blended; once you start reading it, it becomes something in between Knuth's Art of Computer Science with C++ annotated reference manual. This 350 page book is divided into twelve chapters and written as a pseudo war-manual. The topics of chapters are as follows.


* Laying Plans (Designing Databases for Performance)
* Waging War (Accessing Databases Efficiently)
* Tactical Dispositions (Indexing)
* Maneuvering (Thinking SQL Statements)
* Terrain (Understanding Physical Implementation)
* The Nine Situations (Recognizing Classic SQL Patterns)
* Variations in Tactics (Dealing with Hierarchical Data)
* Weaknesses and Strengths (Recognizing and Handling Difficult Cases)
* Multiple Fronts (Tackling Concurrency)
* Assembly of Forces (Coping with Large Volumes of Data)
* Stratagems (Trying to Salvage Response Times)
* Employment of Spies (Monitoring Performance)
Like said in the book, "A skillful developer should aim for response times proportional to the number of rows returned." the author emphasizes on performance, discusses tackling bad SQL code, how to do analysis on problem at hand and then how to think it out in SQL way. The discussion varies from indexes, query optimization, concurrency and physical schema representation. SQL examples in the book are more of analogies than real world examples, they are focused encouraging the reader to think and map these to his or hers real life development experience.

Like author says in one of its notes "Much of the difficulty of good SQL programming lies in seeing how a problem can translate, not into succession of queries to a database but into very few queries.", the core theme of the book is to talk about SQL, not about any particular database. Therefore please don't buy it as a art of SQL Server or Oracle but as a pure SQL (not T-SQL or PL/SQL either) guide. The book is clearly written and easy to understand however, mind you, it's not a freshman's cookbook guide to structured query language. You have to be in trenches to understand Stephane metaphors and they kind of grow on you. For instance, the note "Maximize each visit to the database to complete as much as can reasonably be achieved by each visit." Will remind you of the times when you didn't follow this practice because of reason X, here is your personal guidance counselor.

The Art of SQL is a great way to advance the way you think about the problems in database and query design and their translation into code. I recommend this book to fellow mere mortal developers out there who are looking for a decent, theoretical, not-so-cook-booky-style guide to SQL.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
13 of 14 people found the following review helpful:
5.0 out of 5 stars This is your graduate level course in SQL - how and why, September 14, 2006
By MGMcd (Columbia, MD USA) - See all my reviews
Probably most database solution developers and DBAs have picked up their knowledge of the subject as they have needed it, rather than in a formal and structured (so to speak) method. And even those that have had a structured education probably learned a lot more while in the field. And so there are always gaps. Gaps in technique, but also gaps in the why of many things that I, for example, took for granted about large DBMS's and SQL.

This book handily fills in those gaps. It assumes a moderate to advanced foundation in SQL and DBMS, and then takes off from there.

It is mostly prose with some code and SQL sprinkled throughout, but if you have a foundation, you can flesh out the technique. It is like listening to a graduate level lecture. It is distilled wisdom more than How To, and the more you bring to the material, the more you will get from it. And every page is rich with information. I don't feel like I have wasted my time on any one page, as I often do in the how to manuals.

Definitely an advanced piece.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews

4.0 out of 5 stars Overall, well done
Very well written; examples are a bit goofy, perhaps, but the author is undeniably knowledgeable and has much to say both on commonly referenced mistakes - insufficient indexing -... Read more
Published 7 months ago by David Berube

5.0 out of 5 stars If Sun Tzu Wrote SQL...
...he might write a book like "The Art of SQL". There are a lot of SQL books on the market - some of them very good. Read more
Published 7 months ago by Data Guy

5.0 out of 5 stars An excellent book to read after you think you know databases
This is a book in a somewhat-similar vein to Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition) (Addison-Wesley Professional Computing Series): it... Read more
Published 11 months ago by Matthew Weigel

5.0 out of 5 stars Excellent
This book is very well written and goes into depth on the practical reasons behind best-practices as well as real-world examples.
Published 17 months ago by James M. Schorr

5.0 out of 5 stars This is the book to have if you want to discover better practices for your SQL
This book review was submitted by a Roanoke Valley SQL Server Users Group member as part of the Book Review Program. Read more
Published on March 13, 2007 by RVSSUG

3.0 out of 5 stars Not practical
I'm torn in giving stars to this book. On the one hand there a number of fascinating topics covered, topics not found in other books in my library. Read more
Published on January 7, 2007 by Early Adopter

2.0 out of 5 stars Disappointing
I originally really liked the idea of comparing database design to the ancient "Art of War" classic, but the more I read the book, the more annoying and overly cute this tactic... Read more
Published on December 24, 2006 by Odysseus Levy

5.0 out of 5 stars Exceptional SQL Performance Book
'The Art of SQL' by Stephane Faroult is an outstanding book for any and all database developers that want to learn how to write better SQL code and make their database efficiency... Read more
Published on October 4, 2006 by Daniel McKinnon

5.0 out of 5 stars Most Unusual Technical Book
Imagine a cookbook with no recipes but after you read it it helps to become a better cook. This book does not specifically tells what to do. Read more
Published on October 1, 2006 by Ott Sompol Miller

5.0 out of 5 stars VERY VERY HIGHLY RECOMMENDED!!
Are you a developer or software architect? If you are, then this book is for you! Authors Stephane Faroult and Peter Robson, have done an outstanding job of writing a book that... Read more
Published on September 13, 2006 by John R. Vacca

Only search this product's reviews



Customer Discussions

 Beta (What's this?)
New! See all customer communities, and bookmark your communities to keep track of them.
This product's forum (0 discussions)
  Discussion Replies Latest Post
  No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
  [Cancel]

   


Product Information from the Amapedia Community

Beta (What's this?)



Look for Similar Items by Category


Bath Wonders from LUSH

LUSH bath bombs
Find bath bombs, bath melts, shower jellies, and more great gifts for yourself (or a friend!) from LUSH Fresh Handmade Cosmetics.

Shop LUSH now

 

Best Books of 2008

Best of 2008
Find our top 100 editors' picks as well as customers' favorites in dozens of categories in our Best Books of 2008 Store.
 

Accessorize Your Tools

Shop for Tool Accessories
From drill bits to fasteners, find all the tool accessories you need in Home Improvement.

Shop for tool accessories

 

Best Books

Best of the Month
See our editors' picks and more of the best new books on our Best of the Month page.
 

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.


Where's My Stuff?

Shipping & Returns

Need Help?

Your Recent History

  (What's this?)
You have no recently viewed items or searches.

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.

Look to the right column to find helpful suggestions for your shopping session.

Continue shopping: Top Sellers
Paranoia
Paranoia by Joseph Finder
Glenn Beck's Common Sense
Glenn Beck's Common Sense
Darkfever
Darkfever by Karen Marie Moning

Conditions of Use | Privacy Notice © 1996-2009, Amazon.com, Inc. or its affiliates