Upload
  • Email
  • Favorite
  • Download
  • Embed
  • Private Content

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Sql Antipatterns Strike Back

by Karwin Software Solutions LLC on Apr 21, 2009

  • 44,264 views

Common blunders of SQL database design, queries, and software development. Presented as a tutorial at the MySQL Conference & Expo 2009.

Common blunders of SQL database design, queries, and software development. Presented as a tutorial at the MySQL Conference & Expo 2009.

Accessibility

Categories

Tags

sql mysql db antipatterns database sql antipatterns patterns design performance database patterns hierarchical data arch mysqlconf2009 sql patterns mysql antipatterns sql antipatterns strikes back toread programming persistence practices tips rdbms design-patterns sql anti-pattern bill karwin sql antipatterns bestpractices databasedesign sql antipattern best

More...

Upload Details

Uploaded via SlideShare as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs License

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel

Embed Views

http://jdobbie.blogspot.com 1074
http://www.it4business.ru 469
http://pwfisher.com 271
http://www.graph-database.org 249
http://www.coderholic.com 233
http://www.slideshare.net 144
http://blog.meta.ua 90
http://moskalyuk.name 81
http://www.kupreev.com 48
http://jayant7k.blogspot.com 44
http://www.stetsenko.net 43
http://kupreev.com 41
http://www.blinkoftheday.com 40
http://it4business.ru 40
http://rubyrailsandwindows.blogspot.com 28
http://lj-toys.com 22
http://blog.klaushofeditz.de 17
http://www.pwfisher.com 11
http://twitter.com 10
http://web 8
http://oo-programming.blogspot.com 8
http://software-testing.ru 6
http://jayantkumar.in 4
http://xss.yandex.net 4
http://paper.li 4
http://localhost 3
http://translate.googleusercontent.com 3
http://www.e-presentations.us 2
http://hdknr.posterous.com 2
https://twitter.com 2
http://russomi.blogspot.com 2
http://graph-databases.org 1
http://feeds.feedburner.com 1
http://209.85.229.132 1
http://eddieawad.com 1

More...

Statistics

Favorites
112
Downloads
1,468
Comments
10
Embed Views
3,007
Views on SlideShare
41,257
Total Views
44,264

110 of 10 previous next Post a comment

  • kimprince kimprince Excellent presentation. Would like to clarify a point on slide 70 though, closure tables. I think it's saying the maximum number of rows is O x n x n. What's O?

    I would have thought that, if there were 10 nodes, the maximum number of rows in the closure table would be 10 x 9 x 8 x 7 x ...etc... No?
    2 months ago Reply
    Are you sure you want to Yes No
  • alf239 Alexey Filippov , Software Engineer at EBI The quote about cat seems to be by Douglas Adams (as quoted by Richard Dawkins) 4 months ago Reply
    Are you sure you want to Yes No
  • willlahr Will Lahr I was talking about closure tables in my last comment 6 months ago Reply
    Are you sure you want to Yes No
  • willlahr Will Lahr This seems to be like a kind of loop unrolling. A recurring loop of queries which depend on previous queries is avoided because the recursion is effectively stored in the loop table. So like everything I guess it's a trade off. More space is used up front to make iterating though later less work. For the example you've used it seems like a really good fit because far more reading than writing goes on, and as you say the size of the closure table doesn't expand as alarmingly as you might expect. This was really useful for what I'm working on, thanks for putting it up. 6 months ago Reply
    Are you sure you want to Yes No
  • yurykrikun Yury Krikun at Медиа-Прайс Great presentation! Many thanks to author. 1 year ago Reply
    Are you sure you want to Yes No
  • billkarwin Karwin Software Solutions LLC at Karwin Software Solutions LLC Scott Fraser: thanks, you're right about the corrections to the tree slides. I'll upload the edits soon.

    You're right about CONNECT BY syntax in Oracle. There's also a SQL-2003 syntax for 'common table expressions' that allows you to run recursive queries for Adjacency List tree designs (among other uses). As far as I know, Microsoft SQL Server, IBM DB2, and the recently released PostgreSQL 8.4 support this syntax (see http://wiki.postgresql.org/wiki/CTEReadme).
    2 years ago Reply
    Are you sure you want to Yes No
  • nine_k Dmitry Cheryasov , Software Developer at JetBrains Just awesome. More DB developers should view this :) 2 years ago Reply
    Are you sure you want to Yes No
  • guest570f05a Scott Fraser Hi, very nice deck.

    I think I found some typos: Slide 58, Nested Sets - I think you have the definition of comment left/right flipped around. Right number is GREATER than, and left number is LESS than descendants, no?

    Slide 61and 63 have a SQL error: I think 'descendent.left' should be 'descendent.nsleft'.

    Not sure if it's worth adding, but of course some of the commercial RDBMS out there have addressed some of the challenges you mentioned. For example, Oracle has the CONNECT BY clause, which might be employed to address some of the Naive Tree examples. But then... you have to pay a lot of $$$ for Oracle! :)

    thanks again
    2 years ago Reply
    Are you sure you want to Yes No
  • guest0e11d7 guest0e11d7 Awsome presentation! 2 years ago Reply
    Are you sure you want to Yes No
  • jamesfm James Munro , Developer at Patient Opinion Wow - great presentation. I'm learning a lot, and having to go slowly... 2 years ago Reply
    Are you sure you want to Yes No
Post Comment
Edit your comment Cancel

Sql Antipatterns Strike Back — Presentation Transcript