11.1. Warm-up Exercises

The following mind games are to warm you up and see if you can think a little differently than the way you are used to thinking. I am assuming that the reader started his or her career as a procedural programmer and used sequential file systems for data. The classic structured programming constructs are IF-THEN-ELSE, WHILE-DO, and BEGIN-END, and they are what we have built programs from for decades. It is very hard to escape.

11.1.1. The Whole and Not the Parts

But perhaps the hardest thing to learn is thinking in sets. Consider this classic puzzle (Fig. 11.1).

Figure 11.1. Missing Bricks Puzzle

The usual mistake people ...

Get Joe Celko's Thinking in Sets: Auxiliary, Temporal, and Virtual Tables in SQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.