Archive for the ‘SQL’ Category

Comment cleanup

Wednesday, November 1st, 2006

UPDATE wp_posts SET comment_status='closed';
DELETE FROM wp_comments;

Sorry folks, comments here on Spun are now disabled - the spam got the better of me. I know, I know, there are plugins to help manage it, but I simply don’t have the time. Email me your thoughts on posts to ginatrapani at gmail.

Tags: Database schemas

Sunday, December 4th, 2005

Somewhat old news that I found myself looking up tonight: database schemas for tags, ranging from stuffing keywords into a giant field to 2NF to 3NF.

Being the good database girl that I am, I tend toward third normal form (the last example, which involves 3 tables), but enforcing cascading deletes to trash orphaned tags would be a lot of more work for the app. At the other end of the spectrum, the single table solution seems insane (aren’t LIKE’s generally a no-no?), but at one point when Matt suggested this at Kinja and I consequently almost passed out, after some debate I realized there might be times this would fit best. (Note to self: there is never One True Way.) Maybe in media res, and the 2 table solution is best.

Anyway, a good reference for Web 2.0 taggy apps getting built out there.

Tags: Database schemas [Philipp Keller]