Jochen K. wrote:
I want to store information about links, podcasts, blogs, wikis …
Each item will have a link, user_id, created_at, headline,
description… additional a podcast item will have fields like
filetype_id, duration, mb…, blogs will have a additional field
So my intention is to make a big table with the type field and use
Is this the recommended way to store such data or is there a more
elegant way to solve this?
If you can manage to fairly narrowly define which columns you’ll need up
front then I do think that STI would be the best option here. After all,
it’s all content plus a couple of extras here and there.
An important operative word in polymorphic associations  is
“associations”. You could model it such that you have a generalized and
polymorphic association called something like “content”, but when you
look at it from a functional perspective it really isn’t that much of an
association at all – it’s contained within the same object. The point
I’m trying to make here is that I think that using polymorphic
associations would be a bit of a stretch to make it happen.
So in all: STI is a safe bet and seems fit for use in this case.
Roderick van Domburg