Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your email address or 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
More About the Author
I live in Austin,TX. When I am not writing, I am consulting, speaking at conferences, teaching SQL training classes anywhere on Earth or beating up newbies in SQL Newsgroups.
The rumor that I own only one black suit that I have worn for 30 years is false; I own six identical black suits that I have worn for 30 years.
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.
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
The implementations for trees in SQL described in this book are great.
However if you don't need to understand it really deep you just need to read Celko's article that... Read more
It's not what I expected.
I'm doing alot of SQL programming now and there's also alot of self-joins and just simply alot of analytics in my new position using SQL. Read more