Tags: Database schemas
December 4th, 2005 | Filed under Databases, Reference, Schemas, SQLSomewhat 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.