The Lost Art of the Self Join

Beat Vontobel (MeteoNews AG)
General
Location: Ballroom C
Presentation: external link
Average rating: ****.
(4.25, 4 ratings)

Can you solve a Sudoku with only one SELECT statement? No temporary tables, SQL extensions, stored procedures or functions, not even non-relational features such as ORDER or GROUP BY — just plain joins and predicates? You can! With a combination of (admittedly quite a few) self joins.

Before we finally have a look at this rather exotic fun example however, we concentrate on the most practical uses of joining a table to itself — beyond the classical text-book example of the employee’s table.

There exist multiple classes of problems that can be solved elegantly with a self join. Solutions that are overlooked sometimes even by more experienced developers. The session will sharpen your eyes for these problems, without diving into theory, but with simple hands-on examples that should be easy to grasp with a sound understanding of basic SQL.

Beat Vontobel

MeteoNews AG

Beat Vontobel is the CTO at MeteoNews AG, a Swiss weather forecasting company, where he initiated the transition from MS SQL to MySQL and generally from closed to open source a few years ago. The company used most of the new features of MySQL 5.0 right from the start (and Beat Vontobel, an active member of the MySQL community and of the MySQL guilds, regularly blogged about this experience.

Sponsors
  • Kickfire
  • Zmanda, Inc.
  • Continuent
  • EDS
  • JasperSoft
  • Sun Microsystems
  • Symantec Anti-Virus Software
  • XAware
  • Data Direct Technologies
  • Dolphin Interconnect Solutions
  • Hewlett Packard
  • Infobright, Inc
  • Linagora
  • Microsoft
  • OpSource
  • Oracle
  • Pentaho
  • R1Soft
  • Red Hat
  • Ticketmaster
  • TechRepublic

Contact Us

View a complete list of MySQL contacts.