Recent Articles By Joe Celko
Celko on SQL: Auxiliary Tables vs. Declarative Coding
Auxiliary tables are not only portable across SQL environments and adaptable to external software, they're often a faster, better choice than SQL with computations. And as chips and hardware get faster and cheaper, the auxiliary table approach will make even more sense.
Celko on SQL: Natural, Artificial and Surrogate Keys Explained
SQL programming guru Joe Celko offers a classification scheme and advice on using the right keys.
Celko On SQL: Identifiers and the Properties of Relational Keys
He's back! Author, SQL expert, puzzlemaster and Ming the Merciless look-alike Joe Celko offers his sage (if offbeat) advice on unique identifiers, validation, verification, trusted sources and relational keys.
CSI: Data Warehouse
Armed with a knowledge of patterns, you can root out bad data.
• See all of Joe Celko's Articles
|
SQL Puzzlers
by Joe Celko
Celko's Theater-Seat-Assignment SQL Puzzle
In many situations, auxiliary tables are faster and more appropriate than SQL with computations. To illustrate, consider a classic problem. You have a theater and a bunch of seats you wish to sell for a performance (or think of seats for an airline flight). The seats have a sequential serial number from 1 to (n) for inventory. But in the theater building and on the tickets, the seats are arranged in rows of (k) seats and referenced by the pair (row_nbr, seat_within_row_nbr).
Continue Reading The Blog >>
11. 5.2007
And the 'Email Validation' SQL Puzzle Winner Is...
The winner of last week's 'Email Address Validation' SQL puzzle is "Guest" (see comments), because he/she bothered to do the research and come up with an answer that is generic enough to port to any SQL dialect with a SIMILAR TO or a regexp() function. So, "Guest" please email me with your snail mail address (and some attempt to validate your SQL mastery/identity) and I'll send you one of my books. Here's my answer to last week's puzzle...
Continue Reading The Blog >>
09.27.2007
More Blogs by Joe Celko
|