On Sep 1, 2010, at 15:34 , Jeremy Evans wrote:

> This is generally referred to as polymorphic associations.  They
> violate referential integrity and are a bad idea in most cases (IMO).

Well, that's why I was going to re-establish referential integrity with 
triggers . . .
> 
> Using a separate notes table per main table is the better way to
> handle things.  It preserves referential integrity.  Your solution is
> only elegant in the sense that it reduces the number of tables.  As
> tables are not a scarce resource, it doesn't gain you much.

That alternative hadn't occurred to me. Having all these fields fluttering 
about was a mess. But multiple notes tables: much less messy, but not as 
confusing to Postgres as the polymorphic table. 

>> So, assuming nobody manages to talk me out of this idea in the first place, 
>> how do I explain it to Sequel??

I guess somebody managed to talk me out of it. {chuckle}
Thanks, Jeremy!

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to