I'm adding tags to several models (Posts, Articles, Photos, etc). I'm aware of rails tagging plugins but prefer not to use them, as they don't quite meet my specific needs.
I know the typical way of implementing polymorphic tagging support is to use 2 tables Tags, Taggings and setup the appropriate has_many :through relationships.
But, as I think about it a bit more - and here is my question: Is there a need for a Tags table. Are there any disadvantages of using just a Taggings table and have my relationships like this:
Post, Article, Photo
has_many :taggings
Taggings (attributes)
taggable_type
taggable_id
tag_name
Then I would just need to manage inserting/deleting taggings myself. Basically, I'd like to just store the tag_name attribute directly in the Taggings table instead of a Tags table.
The advantages are that eliminate managing a table, no joins to get the tag names (although I'll be doing a lot of SELECT DISTINCTs).
Could you let me know your thoughts on this design?
Thanks.