Programming Books C Java PHP Python Learn more Browse Programming Books

Joe Celko's SQL for Smarties: Advanced SQL Programming Second Edition (The Morgan Kaufmann Series in Data Management Systems)
 
 
FREE Shipping on orders over $35.

Used - Good | See details
Access codes and supplements are not guaranteed with used items.
 
   
Have one to sell? Sell yours here
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

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

Joe Celko
4.3 out of 5 stars  See all reviews (27 customer reviews)


Available from these sellers.


Free Two-Day Shipping for College Students with Amazon Student Free Two-Day Shipping for College Students with Amazon Student

Hero Quick Promo
Year-End Kindle Daily Deals
Load your library with great books for $2.99 or less each, today only. Learn more

Book Description

October 25, 1999 1558605762 978-1558605763 1

SQL for Smarties was hailed as the first book devoted explicitly to the advanced techniques you need to transform yourself into an expert SQL programmer. Now, in this fully updated second edition, SQL mastermind Joe Celko keeps you moving forward, using his entertaining, conversational style to teach you the best solutions to old and new challenges and to convey the way you need to think if you really want to get the most out of your SQL programming efforts.


Inside, logic- and set-based analyses replace the traditional, procedural approach to problem-solving, helping you make the conceptual leap that separates an SQL guru from the rest of the pack. As you catch on to Celko's approach, you'll devour what he has to say about some of SQL's toughest topics: how aggregate functions really work, the best way to work with NULLs, how and why to fake array structures, and much more.


This book gives special emphasis to SQL-92 and product-independent techniques that let you optimize performance or achieve highly specialized behavior, regardless of the RDBMS with which you work. If you're serious about SQL, you won't let SQL for Smarties out of your sight.



* Presents all-new war stories that give you insight into real-world SQL programming challenges.
* Continues to cover SQL-89 but focuses heavily on the SQL-92 standard.
* Offers still more undocumented tips for working around system deficiencies.
* Teaches scores of advanced techniques that can be used with any product, in any SQL environment.
* Offers expert advice from a noted SQL authority and award-winning columnist.


Editorial Reviews

From the Back Cover

SQL for Smarties was hailed as the first book devoted explicitly to the advanced techniques you need to transform yourself into an expert SQL programmer. Now, in this fully updated second edition, SQL mastermind Joe Celko keeps you moving forward, using his entertaining, conversational style to teach you the best solutions to old and new challenges and to convey the way you need to think if you really want to get the most out of your SQL programming efforts.


Inside, logic- and set-based analyses replace the traditional, procedural approach to problem-solving, helping you make the conceptual leap that separates an SQL guru from the rest of the pack. As you catch on to Celko's approach, you'll devour what he has to say about some of SQL's toughest topics: how aggregate functions really work, the best way to work with NULLs, how and why to fake array structures, and much more.


This book gives special emphasis to SQL-92 and product-independent techniques that let you optimize performance or achieve highly specialized behavior, regardless of the RDBMS with which you work. If you're serious about SQL, you won't let SQL for Smarties out of your sight.


Features




  • Presents all-new war stories that give you insight into real-world SQL programming challenges.
  • Continues to cover SQL-89 but focuses heavily on the SQL-92 standard.
  • Offers still more undocumented tips for working around system deficiencies.
  • Teaches scores of advanced techniques that can be used with any product, in any SQL environment.
  • Offers expert advice from a noted SQL authority and award-winning columnist.

About the Author

Joe Celko served 10 years on ANSI/ISO SQL Standards Committee and contributed to the SQL-89 and SQL-92 Standards.

Mr. Celko is author a series of books on SQL and RDBMS for Elsevier/MKP. He is an independent consultant based in Austin, Texas.

He has written over 1200 columns in the computer trade and academic press, mostly dealing with data and databases.

Product Details

  • Series: The Morgan Kaufmann Series in Data Management Systems
  • Paperback: 550 pages
  • Publisher: Morgan Kaufmann; 1 edition (October 25, 1999)
  • Language: English
  • ISBN-10: 1558605762
  • ISBN-13: 978-1558605763
  • Product Dimensions: 9 x 7 x 1.4 inches
  • Shipping Weight: 1.9 pounds
  • Average Customer Review: 4.3 out of 5 stars  See all reviews (27 customer reviews)
  • Amazon Best Sellers Rank: #155,150 in Books (See Top 100 in Books)

Customer Reviews

Most Helpful Customer Reviews
45 of 46 people found the following review helpful
4.0 out of 5 stars An absolute MUST for any serious SQL programmer February 14, 2000
Format:Paperback
First of all, I couldn't recommend this book for beginners. It is, however, PERFECT for the SQL programmer with some experience who is looking to take his/her SQL abilities to the next level. There are great pure SQL solutions for problems that many programmers think must be done outside of SQL in a host language. One of the most important lessons from the book is this: think in terms of sets and set theory instead of in terms of columns and rows. Lots of other great info though. Be warned: the examples are all written in the SQL-92 ANSI standard. Examples will have to be modified if your vendor-specific implementation of SQL doesn't follow the standard precisely. Kudos to Joe.
Comment | 
Was this review helpful to you?
158 of 179 people found the following review helpful
3.0 out of 5 stars I'm a little underwhelmed... January 11, 2002
Format:Paperback
Not so much unimpressed at Joe's knowledge, which is impressive indeed: the book reads a lot more like a teaching text than most technical books.
But there are things in here which may lead astray some who have already done things that Joe advises strongly against. I will concentrate on one example: In chapter 3 "Numeric Data in SQL", under the heading "Generator Functions" (e.g., IDENTITY, AUTO_INCREMENT) we get this doozy: "This is a horrible, nonstandard, nonrelational proprietary extension that should be avoided whenever possible". Just a statement, no reason whatsoever provided for it, because I guess he assumes we know some "math rule" or something behind why it is such a bad idea. Now, we must think for a minute why one uses such a data column. In my own case, I have a table called Parts that contains parts from several different companies. So, I guess Joe would have me make a composite primary key from PN and CompanyID. But, wait a minute, that complicates matters when I need to have a foreign key reference to the Parts table, and, oh by the way, just what is CompanyID anyway, maybe some other composite key, or some goofy "rule-based" (can you say TRIBAL KNOWLEDGE) thing? You can't seriously believe that "ALFKI" is a better key than,say, 33. What happens when I get a new customer named "Alfred Kiplinger", and have to change the "rule" that I came up with for defining the primary key? See the problem? You're not going to remember the ID anyway, because the rule will be broken at some point. I also happen to think that a part number (to give one example) should be changeable. So, I don't make PN the primary key (because you should NEVER change a PK), I simply have the database generate one for me.
Read more ›
Was this review helpful to you?
45 of 54 people found the following review helpful
1.0 out of 5 stars Full of academic exercises and toy examples May 27, 2001
By A Customer
Format:Paperback
My first problem with this book is its errors. ... there must be one on every page. There's way, way too many typos for a book like this. Half the examples won't work without corrections.
My second problem is that the book is rife with academic exercises that have little application in the real world. Code that uses cross joins will not perform well against even moderately sized data sets. Most of the examples make great magazine pieces, but fall short of anything that's actually useful in the real world.
Third, Celko likes to use syntax that has been implemented on paper only. For example, he uses set operations that no vendor has yet implemented (and probably never will since they became part of the ANSI standard years ago). A fair number of the examples in this book use code that will not run on any DBMS - even after you clean up the typos....
In sum, this book was a good idea, it's just a poor implementation. Celko needs to do some real DBA work and write from that experience. Saying "different DBMSs implement things differently - see your vendor docs" on every other page doesn't help anyone.
Comment | 
Was this review helpful to you?
18 of 20 people found the following review helpful
5.0 out of 5 stars Exceptional quality in a computer manual July 15, 2000
Format:Paperback|Verified Purchase
I cannot work without this book. Stuck with a poor database structure and huge volumes of data, I have had to explore every trick of the trade. Few computer books in general provide information that is accurate, helpful, and not repetitive of manuals and online material that is already available to you. This book is of exceptional value. Someone swiped mine and believe me, I must have another copy. How many of the computer books you have purchased get that kind of respect?
Warning: Beginners may need another book and it is not a replacement for your SQL vendor specific reference.
Comment | 
Was this review helpful to you?
9 of 9 people found the following review helpful
5.0 out of 5 stars Great book July 26, 2001
Format:Paperback
Joe Celko knows SQL. He may make some typos as a writer but make no mistake... this guy knows what he's talking about. He knows the language and the mechanics of the major database engines. But more importantly, he understands the logic of it all. Some of his SQL moves are simply brilliant.
I develop enterprise applications and am called upon now and then to create some very challenging SQL. Celko has bailed me out several times. I have the book as a reference source right next to my database reference manuals. He is full of ideas and often times I am looking for an idea, not a recipe.
This is a book for people who have a good knowledge of SQL. It will stimulate your thinking and programming. It isn't a book for beginners. In the right hands, SQL for Smarties will really add some sizzle to your SQL coding.
Brianne Elizabeth Corbett - IBM Global Services
Comment | 
Was this review helpful to you?
8 of 9 people found the following review helpful
3.0 out of 5 stars More Care Required March 12, 2001
Format:Paperback
I knew of Joe Celko from his contributions to database-related magazines and had great expectations of this work.
However, while there is much in the book that is worthwhile, I found it terribly sloppy, not only in the practical solutions supplied but in all aspects of the book. Nearly every sample piece of code, even quite short snippets, has a bug in it; the descriptions of the problems he is attempting to solve and the explanations of the solutions are full of unstated assumptions; and much of the general text is imprecise or vague and skims over areas that could do with more detailed explanations. Some parts I have read several times over without being able to make any sense of them.
In fact, I have come to the point where, if a section of text or a practical example seems wrong or difficult to follow, I don't know any more if it's Joe's fault or mine.
To Joe's credit, I can say that I have corresponded with him and he was quick to reply and was willing to continue the discussion when I followed up. He generally comes across as a "great guy", and he did accept my criticism of the solution he'd given to a problem and produced a satisfactory alternative, but every point I made to him had to be explained in detail and I still felt at the end that he wouldn't get the solution 100% right when he incorporated it in his book.
One section of the book that I found absolutely fascinating was a short description of the standardization process of the Western or Gregorian calendar. It was mostly irrelevant to the topic of the book but fascinating nonetheless. There are other gems scattered throughout, he has a good list of references and I have found he has made several points which I could quote to support my postion in arguments in standards committee meetings, but I feel that it would take as much more effort to get the book right as it has take already to produce it.
Comment | 
Was this review helpful to you?
Most Recent Customer Reviews
4.0 out of 5 stars Great selection for serious SQL users
Excellent book, filled with very clearly presented examples and concepts from general SQL programming. Read more
Published on July 19, 2005 by Merrill Aldrich
5.0 out of 5 stars Indispensible recipes for SQL success.
I needed to link to this book for a blog entry, and I was looking for my review of this book when I realized I never wrote one. Read more
Published on March 16, 2005 by Christopher Wanko
3.0 out of 5 stars Smarties or oldies?
I have browsed at this book in bookstores for years, always wondering if the info in it would be of use to me.

I write queries all day, in SQL Server, Sybase 5. Read more
Published on December 9, 2004 by Daniel Williams
4.0 out of 5 stars Be a SQL God
If you need to sling some really nasty SQL which you probably shouldn't be writing in the first place, then this book is for you. Celko is the man. Read more
Published on February 12, 2004 by Terry Smith
5.0 out of 5 stars Excellent Resource for Database Programmers
SQL for Smarties is a book that you should own if you work with relational databases. It has good practical advice and good examples. Read more
Published on November 2, 2003 by Steve Berczuk
5.0 out of 5 stars Excellent Resource for Database Programmers
SQL for Smarties is a book that yoo should own if you work with relational databases. It has good practical advice and good examples. Read more
Published on November 2, 2003 by Steve Berczuk
5.0 out of 5 stars Amazing
This book is one of the first references I have found on SQL that doesn't spend 75% of the book discussing simple Select, Update and Delete statements. Read more
Published on August 20, 2003 by Amazon Customer
5.0 out of 5 stars Optimised SQL Ahoy!
This book has been marvellous for me. I've been dealing with large ERP databases for the last two years now and Joe has really helped me tune and optimise my SQL to get the best... Read more
Published on August 2, 2003 by Mark Ashworth
5.0 out of 5 stars SQL for Smarties
A nice programers reference, full of examples on how to do appl ication programing in sql. If you are a program uses SQL often you may find this helpful.
Published on June 13, 2003
5.0 out of 5 stars PERFECT for the real world
"The examples that come to mind are his organizational trees. Who cares about that?" I do! Our company has a hierarchical structure with imperfections. Read more
Published on February 18, 2003
Search Customer Reviews
Search these reviews only





Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Forums

Search Customer Discussions
Search all Amazon discussions

Topic From this Discussion
Why are the reviews for all editions lumped together?
I have the first edition of the book and, if there are any typos, I didn't find them. However, given the number of complaints about typos I would have to believe that the later editions are different, at least in that respect.
Jan 17, 2008 by P. Vogel |  See all 2 posts
source code? Be the first to reply
Start a new discussion
Topic:
First post:
Prompts for sign-in
 




Look for Similar Items by Category