To get the free app, enter your mobile phone number.
Joe Celko's Trees and Hierarchies in SQL for Smarties, (The Morgan Kaufmann Series in Data Management Systems) 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
There is a newer edition of this item:
Customers Who Bought This Item Also Bought
Top Customer Reviews
Omitted is the most common way hierarchies are represented in Data Warehouses using a "hierarchy bridge table". See Kimball?s book "Data Warehouse Toolkit" for more detail (yet not enough detail to give a Celko-like exploration of the topic). The bridge table solution trades away storage space for greater speed by creating a record for every path enumeration.
The book?s primary focus is on strict hierarchies. Not enough attention is given to convergent graphs and other arbitrary directed acyclic graphs, like bill of materials that reuse assemblies, where the nested sets model fails (p.164).
Also missing is maintenance of historical versions of the hierarchy, often required by financial applications.
Section 9.3 on the extremely powerful DB2 ?WITH? operator is too slim, especially since it is a SQL-99 standard and is now available with Microsoft SQL Server. If you work with hierarchies or acyclic graphs in DB2 or SQL Server take the time to learn how to use ?common subquery expressions?.
By all means if you work with hierarchies you must buy this book. No doubt the Second revison of this book will blow us away.
This book shows how to do those things strictly in SQL. It made me realize that SQL itself can really be a programming language. You can write pretty heavy-duty programs just with SQL. That made my brain hurt!
A lot of the material covered in the book is way more advanced than I can handle right now, and more than I really need. But I've found over and over again that if I say, "I'll never need that," it's only a matter of time until I do need it. And even if I don't need anything as advanced as this, I've already learned a lot about what SQL can do.
I'm going to look up Joe Celko's other SQL books. I need to make my brain hurt some more.
There's a limited audience for this book, as many SQL developers just won't need to deal with these data types, or they'll deal with fixed, mixed-type trees (such as Customer->Account->Transactions) in which many of these techniques won't be needed.
Also, some database systems (such as Oracle) have very powerful proprietary SQL dialects that will do obviate the need for much of this - if you are willing to use a DBMS-specific solution. But this book is written in a dialect-agnostic way.
I think the nicest thing about this book is that I've seen really bad table designs created just to avoid having to deal with trees and hierarchies, and this wook should help people avoid that and yet still feel thay will be able to program effectively using those kinds of designs.
Note to MySQL users - as of MySQL 5 you can create everything written in this book, although you will need to remove the ATOMIC keyword from the procedures.
One trend that began to develop was that the best information on the subject was coming from Joe Celko, a rather prolific author/speaker on all things SQL.
Joe Celko has a book in publication called SQL For Smarties, and this book had some basic information on handling hierarchies, which he followed up with Trees and Hierarchies in SQL for Smarties, a truly excellent book on the subject.
This book is not for the faint of heart, but it really is a must-read for those who are looking to handle hierarchies in SQL.
The book only addresses MySQL once, and while in that section it repeats Joe's opinion of MySQL not being a real database, users of MySQL 5 can rest assured that the stored procedure examples in the book work without modification (thanks to Joe and MySQL 5 both using the standard PL/PSM stored procedure syntax).
Overall this is an excellent book for those looking to implement hierarchical data in SQL.
Most Recent Customer Reviews
Good book. Joe Celko wrote this book for advanced readers. I've read his SQL for Smarties previously and it was also excellent. Read morePublished 22 days ago by Michael R. Blaha
Well, I mean to speed up your software that has any attachment to databases and if there is any kind of hierarchy in your data structure that's slowing it down. Read morePublished 21 months ago by Joseph Dewey
Wow, you have to work hard to keep up with this very advanced book. It's sitting on my shelf as an essential reference book.Published on June 11, 2014 by TechKnowMage
I used the book to learn about graph modelling within an environment that I knew. The author explains things very well (from a programmer perspective).Published on January 10, 2014 by Bjxrn Hxj Jakobsen
Littered with small errors which decrease reading speed and poorly referenced sources of data (introduces several tables with similar data without propper distinction).Published on November 25, 2013 by Michael Häggblad
The book is pretty good and very complete regarding the subject of hierarchical data models. I just missed more comparisons between the discussed methods.Published on October 29, 2013 by Diego Moreira da Rosa
This book definitely lives up to it's smarties name.
I've seen stuff being done in SQL I never thought of doing myself nor did I think possible, then again I'm no SQL... Read more
I don't write much SQL these days as I manage projects. I have ordered a couple of Joe Celko's books for the DBA's assigned to my team and they have found both books enlightening... Read morePublished on July 5, 2012 by Mark
I have some prior Joe Celko books which have been my 'goto' books for SQL challenges. This one, in comparison to my other books, delves deeper and more technically into the... Read morePublished on June 22, 2012 by ILoveGadgets