Slashdot Mirror


The Practical SQL Handbook: Using SQL Variants (4th ed.)

Continuing the grand tradition of reviewing computer texts sent to us by publishers, Slashdot author chrisd has read the book The Practical SQL Handbook: Using SQL Variants and written up a review. If you are interested, read on ... The Practical SQL Handbook, 4th Edition, SQL Variant author Judith S. Bowman, Sandra L. Emerson, Marcy Darnovsky pages 512 publisher Addison Wesley rating 9 reviewer chrisd ISBN 0201703092 summary An indispensable introduction to SQL. This is probably one of the best books I've read for those new to SQL. It's the kind of book I wish I had many years ago when I was first learning about databases. The only problem is the SQL variants are not really for me, a developer uninterested in Oracle, MS-SQL, Sybase or Informix. That said, this is a minor part of the book and doesn't really detract from it, and I can even come up with any number of reasons why a developer would want to have that information. A comparative text would be useful by itself, but I think that trying to teach SQL and several SQL variants is too big a job for any one book.

The books introductory text on SQL is clear and concise. I also found its treatment of normalization to be as close to perfect as can be with one exception: It doesn't tell when you can go too far with normalization. In an introductory text this is acceptable, and perhaps wise considering what many new to relational databases consider acceptable database design.

And while the introductory chapter is great, the chapters on selects and joins is so clear and useful that I would even call it exciting. The terrific thing about this book is when you have finished reading it you should come away with a feel for how the underlying DB actually works and what it is doing to produce the data for you.

I personally found this book very useful, even though I am using MySQL for the application I'm writing. But the feature set that MySQL chooses to support will logically limit the usefulness of the this book for the MySQL user. Programmers developing for Postgres, Firebird, and others will obviously get much more out of the book and its treatments on subqueries and views than will MySQL users.

One thing that did turn me off is the inclusion of a CD-ROM. The CD has a copy of Sybase for the user to work with. I don't need to explain that the internet is a superior place to put such things. That said, at least it wasn't glued to the back cover (a pet peeve) and was instead bound into the book like a magazine reply card. Many publishers perceive that they can charge more for a book that has a CD, but I just find it annoying and wasteful. But that's hardly a reason not to buy this book and place it on your bookshelf in a prominent position, not on the bottom ghetto shelves next to the stack of paper for your printer.

In short, those looking for an book about SQL, that won't teach them bad habits would be well served by this book (and likely by its sister book, The Practical SQL Handbook: Using Structured Query Language by the same authors) and those who think they know SQL will find it a useful text to have handy as well.

You can purchase The Practical SQL Handbook: Using SQL Variants from bn.com. Slashdot welcomes readers' book reviews -- to submit yours, read the book review guidelines, then visit the submission page.

6 of 227 comments (clear)

  1. Not much different. by Anonymous Coward · · Score: 2, Informative

    I have the 3rd edition and was actually flipping through the 4th edition a couple of days ago at the bookstore. I honestly didn't see any big differences at all, certainly not enough to justify buying another copy.

  2. Re:Glad they emphasis SQL-92 by eric2hill · · Score: 3, Informative

    "MS SQL-Server actually does a better job of it than even Oracle."

    Oracle 9i now supports the SQL-92 syntax including natural joins. If you want to join two or more tables that have properly named keys (like key names for PK/FK relationships), then you can use the following:

    select *
    from A
    natural join B
    where A.MayorName is not null
    and B.TaxRate > 5

    It's a very nice way to join a lot of properly normalized tables with little to no WHERE clauses. SQL Server can probably do the same thing as well.

    --
    LOAD "SIG",8,1
    LOADING...
    READY.
    RUN
  3. Re:Very controversial book by gazbo · · Score: 4, Informative
    Although you can do some replication work yourself, I'm happy to concede that if you want the work done for you you need thrid party software. To say that Postgres doesn't support it is a bit misleading though.

    Postgres doesn't support automated replication in the core code but there are open source plugins that will handle this. Equally, PHP does not support gzip functions as part of the core language, but should this be highlighted as a shortcoming of the language? No - just install zlib et voila!

    I don't care whether the automated tools come with the core download or not - if they're freely available and work cleanly with the code (not dirty hacks) then there is no problem. Nested subqueries in MySQL is a problem as there was no (as far as I could google) patch I could apply that would enable this functionality. This is not true for pg replication.

    A chapter on the shortcomings of Postgres wrt replication would be half a page long and consist of a list of URLs, saying "install one of these".

  4. Titles? Editions? Sequels? by fm6 · · Score: 3, Informative
    its sister book, The Practical SQL Handbook: Using Structured Query Language by the same authors.
    Uhm. Despite the change in the title, I believe this is an earlier edition of the same book. No idea why it's still in print -- perhaps some people prefer to focus on SQL-89 and forget about SQL-92. Anyway, you're probably thinking of Practical SQL: The Sequel
  5. Re:SQL Limitations ? by Slime-dogg · · Score: 2, Informative

    The real area where SQL is weak is recursion. There is no allowance for recursion in '92 and there is little I believe in '99.

    An excellent language to examine is Datalog, which uses rules to do queries. The structure of the Datalog language, as well as it's queries, falls very close to the definition of a finite state machine.

    You can show the flow of data, and how it fits within the bounds of the rules you give it, all by drawing the states that you define within the language. The query ends when it reaches a point where it can no longer process any data.

    SQL is great for database work, but I honestly believe that the future lies in a rules-based language like Datalog.

    --
    You need to restart your computer. Hold down the Power button for several seconds or press the Restart button.
  6. SQL in a Nutshell helpful for variants by billmil · · Score: 2, Informative

    As for keeping track of sql variants, I recommend Oreilly's *SQL in a nutshell*. It's helped me quite a bit developing a vendor neutral app that runs on both Oracle and SQL Server. (It covers Postgres and MySQL also).

    As the reviewer posted, learning sql and learning the various flavours IMHO is too much for one book. The Nutshell book is a reference for advanced users.