SQL Antipatterns

Bill Karwin (Karwin Software Solutions)
Presentation: SQL Antipatterns Presentation [ZIP]
Average rating: ****.
(4.00, 3 ratings)

New users may make naive errors as they learn, but it takes an experienced developer to make the same mistakes over and over.

Bill Karwin has answered questions from SQL users for over ten years. Some techniques have emerged as widely used, but flawed, making them brittle, buggy solutions and create security or scalability risks in your projects.

In this tutorial, Karwin describes SQL techniques that should be called antipatterns, illustrates their weaknesses, and offers better solutions. He updates topics from his popular presentation at MySQL Conference 2007, and adds new topics including the following:

Logical Database Antipatterns:
  • Storing multivalued attributes in strings
  • Searching attributes in multiple columns
Physical Database Antipatterns:
  • Defining a mandatory “id” pseudokey column in every table
  • Storing image data in external files instead of BLOB columns
Query Antipatterns:
  • Using the HAVING clause instead of the WHERE clause
  • Relying on wildcard or implicit columns in SELECT and INSERT
Application Development Antipatterns:
  • Using persistent connections
  • Writing functions and triggers with external side-effects
Photo of Bill Karwin

Bill Karwin

Karwin Software Solutions

Bill Karwin is the author of the upcoming book SQL Antipatterns from Pragmatic Bookshelf. He has been a software developer and technical writer since 1988. He is widely known for his talent for explaining complex topics and practical techniques with accuracy and a little humor.

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.