Chapter 11. Thinking in SQL

I HAVE BEEN telling students that you need about one year of full-time SQL programming before you have an epiphany and start thinking in SQL. Most beginners mimic their original programming language until they have their epiphany.

When DB2 was first released, you would find COBOL programmers who converted their existing file layouts into CREATE TABLE statements, the READ statements were converted into FETCH statements and so forth—a simple one-to-one mapping from one language to another. There were no JOIN operations done in the SQL. Cursors looped through data as if they were reading a magnetic tape file. Even today, people are making similar mistakes with DB2 when they try to convert old VSAM applications to DB2 ...

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.