Counting (32 pages)

Integer Generators (24 pages)

Exotic Operators (40 pages)

Constraints (19 pages)

Trees (39 pages)

Graphs (41 pages)

6 Responses to “Chapters 1-6”

  1. Joe Celko Says:

    I disagree that Relational Division comes once in a lifetime. I use it all the time for reports that look for “shopping basket” patterns in sales data.

  2. Михаил Says:

    Вадим, огромное спасибо за отличную книгу!!!

    С уважением, Михаил.

  3. Михаил Says:

    в ссылке на вторую главу есть маленькая опечатка (pdff вместо pdf)
    еще раз спасибо за книгу!!!!!!

  4. AntC Says:

    Hi Vadim, a thread on another forum has mentioned an exotic operator you don’t include:

    SQL’s UNION CORRESPONDING seems to be the same as the RL’s inner union.
    (Hugh Darwen says that this operator was available in ISBL/BS12, called plain UNION. So not the same as SQL’s plain UNION.)

    I don’t see any evidence that anybody realised this operation is the inverse of Nat Join.

  5. I was not aware of UNION CORRESPONDING, thank you!

  6. Dave Says:

    Hi Vadim

    Just bought your book and reading chapter 1 counting. I have a minor quibble about the scalar subquery corresponding to the predecessor example

    I ran your examples on the northwind sample database using the web interface on w3 schools

    and replaced their query versions of your example queries on their database. It worked a treat. But my version of the scalar subquery

    SELECT t.ContactName t, t.CustomerID id,
    (SELECT count(*) from Customers tt WHERE tt.CustomerID < t.CustomerId) seq
    FROM Customers t
    GROUP BY t.CustomerID

    is not exactly the same query as you gave – no #, and <= is replaced with <

    But it also return zero as a result which did not occur in my version of the predecessor query

    SELECT t.ContactName t, t.CustomerID id, Max(tt.CustomerID) predecessor FROM Customers t, Customers tt WHERE tt.CustomerID < t.CustomerID
    GROUP BY t.CustomerID



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: