On Fri, Apr 17, 2009 at 9:50 AM, Clive Crous <[email protected]> wrote:
>
> 2009/4/17 Todd Benson <[email protected]>:
>> Thing -> relates_to <- Thing
>> ...is absolute folly.
>
> I'm not saying it's pleasant by any means. It's simply unavoidable and
> perhaps even "better" (from a normalization point of view)

I'm going to go with "negatory" there, especially with normalization.
It stinks of denormalization, so that we may acquire some sense of
flexibility.  Doesn't work.  Never really has, in my experience.

> in some
> cases.
>
> Using "complex joins" as a reason, no excuse, for not allowing this
> king of relationship seems silly to me.
>
> In any form of hierarchy (eg human genealogy, comments on comments or
> any other form of "same item" relates to "same item" in some way)
> you'll end up either using thing -> thing or end up with unnormalized
> data, or even worse, not being able to deliver the required feature (
> "I'm sorry you can only comment once on any given comment you cannot
> comment on a comment on a comment" ).

In a relational setup, you can use nested sets and materialized paths.
 You can even get really crazy and use continued fractions as part of
the path method (see Vladim Trapishko's work).  Obviously, one has to
decide what really is important for the situation.  A generic relation
does not a tuple make, though.  It's like saying, "Hey I'm free!  I
can do anything I want."

Show me data integrity and good queries and then you have my vote.  Oh
wait, I forget, you have to write a bunch of unit tests first (okay, I
lost the whole ruby community with that one; my bad)

>
> Citing insert or update complexity is just silly, you write that code
> once, then use it in an abstracted model where you don't care.
>
>> Nice, succinct post by the way.
>
> Thanks :)

Welcome :)

In any case, the OP simply wants a many-to-many relationship to work,
so I suppose it's not really my place to cut down his DB design.

Todd

--~--~---------~--~----~------------~-------~--~----~
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