Wednesday, April 16, 2008

SQL Antipatterns slides

Monday I gave a presentation at the MySQL User Conference in Santa Clara.  I uploaded my presentation materials as a PDF to my website.  It's available under the Creative Commons 2.0 license for non-commercial, no derivative use.

4 comments:

Simon_Schmitt_HD said...

Sometimes you'll find something out in webspace brilliant like a diamond. These slides are really great. Thanks for this great overview!

FelhőBácsi said...
This comment has been removed by the author.
Gergely Hodicska said...

Thanks for sharing the slides, it is a really great collection of antipatterns, and I really liked the pragmatic and demanding approach how the presentation is built up.

An another common antipattern is the following: one have more entities (users, articles etc.) and has one comment table where there is an entity_type (metadata) and an entity_id (data) field. I don't like this one too, what is your opinion about this?

Bill Karwin said...

Hi Gergely, thanks for your comment. Yes, what you are describing is called "Polymorphic Associations" and it's also an antipattern.

Like Entity-Attribute-Value, Polymorphic Associations store metadata as data, and this antipattern fails to use the database to enforce data integrity.